mirror of
https://github.com/3b1b/manim.git
synced 2025-08-02 19:46:21 +08:00
Updates to scenes before early release of (the actual) beta2
This commit is contained in:
File diff suppressed because it is too large
Load Diff
2008
from_3b1b/active/bayes/beta3.py
Normal file
2008
from_3b1b/active/bayes/beta3.py
Normal file
File diff suppressed because it is too large
Load Diff
@ -389,11 +389,18 @@ def scaled_pdf_axes(scale_factor=3.5):
|
||||
return axes
|
||||
|
||||
|
||||
def close_off_graph(axes, graph):
|
||||
x_max = axes.x_axis.p2n(graph.get_end())
|
||||
graph.add_line_to(axes.c2p(x_max, 0))
|
||||
graph.add_line_to(axes.c2p(0, 0))
|
||||
graph.lock_triangulation()
|
||||
return graph
|
||||
|
||||
|
||||
def get_beta_graph(axes, n_plus, n_minus, **kwargs):
|
||||
dist = scipy.stats.beta(n_plus + 1, n_minus + 1)
|
||||
graph = axes.get_graph(dist.pdf, **kwargs)
|
||||
graph.add_line_to(axes.c2p(1, 0))
|
||||
graph.add_line_to(axes.c2p(0, 0))
|
||||
close_off_graph(axes, graph)
|
||||
graph.set_stroke(BLUE, 2)
|
||||
graph.set_fill(BLUE_E, 1)
|
||||
graph.lock_triangulation()
|
||||
|
@ -45,7 +45,7 @@ def stage_scenes(module_name):
|
||||
animation_dir = os.path.join(
|
||||
os.path.expanduser('~'),
|
||||
"Dropbox (3Blue1Brown)/3Blue1Brown Team Folder/videos",
|
||||
"sir", "1440p60"
|
||||
"bayes/beta2", "1440p60"
|
||||
)
|
||||
#
|
||||
files = os.listdir(animation_dir)
|
||||
|
Reference in New Issue
Block a user