File tree Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -54,20 +54,17 @@ Examples to illustrate the use of GrapheScenes in Manim
54
54
:quality: medium
55
55
:save_last_frame:
56
56
57
- class Plot3bGaussian(GraphScene):
58
- global amp
59
- global mu
60
- global sig
61
- amp = 5
62
- mu = 3
63
- sig = 1
57
+ amp = 5
58
+ mu = 3
59
+ sig = 1
64
60
65
- def gaussian(self, x):
66
- return amp * np.exp((-1 / 2 * ((x - mu) / sig) ** 2))
61
+ def gaussian(x):
62
+ return amp * np.exp((-1 / 2 * ((x - mu) / sig) ** 2))
67
63
64
+ class Plot3bGaussian(GraphScene):
68
65
def construct(self):
69
66
self.setup_axes()
70
- graph = self.get_graph(self. gaussian, x_min=-1, x_max=10).set_stroke(width=5)
67
+ graph = self.get_graph(gaussian, x_min=-1, x_max=10).set_stroke(width=5)
71
68
self.add(graph)
72
69
73
70
.. manim :: Plot3cGaussian
You can’t perform that action at this time.
0 commit comments