mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Add an option for a graph to continually update to its defining function
This commit is contained in:
parent
cbc32468bf
commit
0d046a7eab
1 changed files with 5 additions and 0 deletions
|
@ -175,6 +175,7 @@ class CoordinateSystem(ABC):
|
|||
self,
|
||||
function: Callable[[float], float],
|
||||
x_range: Sequence[float] | None = None,
|
||||
bind: bool = False,
|
||||
**kwargs
|
||||
) -> ParametricCurve:
|
||||
x_range = x_range or self.x_range
|
||||
|
@ -195,6 +196,10 @@ class CoordinateSystem(ABC):
|
|||
)
|
||||
graph.underlying_function = function
|
||||
graph.x_range = x_range
|
||||
|
||||
if bind:
|
||||
self.bind_graph_to_func(graph, function)
|
||||
|
||||
return graph
|
||||
|
||||
def get_parametric_curve(
|
||||
|
|
Loading…
Add table
Reference in a new issue