mirror of
https://github.com/3b1b/manim.git
synced 2025-09-01 00:48:45 +00:00
Clearer defaults
This commit is contained in:
parent
2d0257562f
commit
6e523ed960
1 changed files with 6 additions and 3 deletions
|
@ -84,9 +84,12 @@ class CoordinateSystem():
|
||||||
)
|
)
|
||||||
return self.axis_labels
|
return self.axis_labels
|
||||||
|
|
||||||
def get_graph(self, function, **kwargs):
|
def get_graph(self, function, x_min=None, x_max=None, **kwargs):
|
||||||
x_min = kwargs.pop("x_min", self.x_min)
|
if x_min is None:
|
||||||
x_max = kwargs.pop("x_max", self.x_max)
|
x_min = self.x_min
|
||||||
|
if x_max is None:
|
||||||
|
x_max = self.x_max
|
||||||
|
|
||||||
graph = ParametricFunction(
|
graph = ParametricFunction(
|
||||||
lambda t: self.coords_to_point(t, function(t)),
|
lambda t: self.coords_to_point(t, function(t)),
|
||||||
t_min=x_min,
|
t_min=x_min,
|
||||||
|
|
Loading…
Add table
Reference in a new issue