mirror of
https://github.com/3b1b/manim.git
synced 2025-07-28 20:43:56 +08:00
Fixed FunctionGraph bug
This commit is contained in:
@ -70,7 +70,7 @@ class ParametricCurve(VMobject):
|
|||||||
class FunctionGraph(ParametricCurve):
|
class FunctionGraph(ParametricCurve):
|
||||||
CONFIG = {
|
CONFIG = {
|
||||||
"color": YELLOW,
|
"color": YELLOW,
|
||||||
"x_range": [-8, 8, 0.1],
|
"x_range": [-8, 8, 0.5],
|
||||||
}
|
}
|
||||||
|
|
||||||
def __init__(self, function, x_range=None, **kwargs):
|
def __init__(self, function, x_range=None, **kwargs):
|
||||||
@ -83,7 +83,7 @@ class FunctionGraph(ParametricCurve):
|
|||||||
def parametric_function(t):
|
def parametric_function(t):
|
||||||
return [t, function(t), 0]
|
return [t, function(t), 0]
|
||||||
|
|
||||||
super().__init__(parametric_function, x_range, **kwargs)
|
super().__init__(parametric_function, self.x_range, **kwargs)
|
||||||
|
|
||||||
def get_function(self):
|
def get_function(self):
|
||||||
return self.function
|
return self.function
|
||||||
|
Reference in New Issue
Block a user