A community-maintained Python framework for creating mathematical animations.
Renamed `get_graph` (and the like) to `plot` (#2187)
icedcoffeeeec8746369e611
diff --git a/docs/source/examples.rst b/docs/source/examples.rstindex 0effb54c5..d787c7111 100644--- a/docs/source/examples.rst+++ b/docs/source/examples.rst@@ -313,7 +313,7 @@ Plotting with Manim:save_last_frame::ref_modules: manim.mobject.coordinate_systems:ref_classes: MathTex- :ref_methods: Axes.get_graph Axes.get_vertical_line_to_graph Axes.input_to_graph_point Axes.get_axis_labels+ :ref_methods: Axes.plot Axes.get_vertical_line_to_graph Axes.input_to_graph_point Axes.get_axis_labelsclass SinAndCosFunctionPlot(Scene):def construct(self):@@ -329,8 +329,8 @@ Plotting with Manimtips=False,)axes_labels = axes.get_axis_labels()- sin_graph = axes.get_graph(lambda x: np.sin(x), color=BLUE)- cos_graph = axes.get_graph(lambda x: np.cos(x), color=RED)+ sin_graph = axes.plot(lambda x: np.sin(x), color=BLUE)+ cos_graph = axes.plot(lambda x: np.cos(x), color=RED)sin_label = axes.get_graph_label(sin_graph, "\\sin(x)", x_val=-10, direction=UP / 2@@ -363,7 +363,7 @@ Plotting with Manimdef func(x):return 2 * (x - 5) ** 2- graph = ax.get_graph(func, color=MAROON)+ graph = ax.plot(func, color=MAROON)initial_point = [ax.coords_to_point(t.get_value(), func(t.get_value()))]dot = Dot(point=initial_point)@@ -379,7 +379,7 @@ Plotting with Manim.. manim:: GraphAreaPlot:save_last_frame::ref_modules: manim.mobject.coordinate_systems- :ref_methods: Axes.get_graph Axes.get_vertical_line_to_graph Axes.get_area Axes.get_axis_labels+ :ref_methods: Axes.plot Axes.get_vertical_line_to_graph Axes.get_area Axes.get_axis_labelsclass GraphAreaPlot(Scene):def construct(self):@@ -392,8 +392,8 @@ Plotting with Manimlabels = ax.get_axis_labels()- curve_1 = ax.get_graph(lambda x: 4 * x - x ** 2, x_range=[0, 4], color=BLUE_C)- curve_2 = ax.get_graph(+ curve_1 = ax.plot(lambda x: 4 * x - x ** 2, x_range=[0, 4], color=BLUE_C)+ curve_2 = ax.plot(lambda x: 0.8 * x ** 2 - 3 * x + 4,x_range=[0, 4],color=GREEN_B,@@ -410,7 +410,7 @@ Plotting with Manim.. manim:: HeatDiagramPlot:save_last_frame::ref_modules: manim.mobject.coordinate_systems- :ref_methods: Axes.get_line_graph Axes.get_axis_labels+ :ref_methods: Axes.plot_line_graph Axes.get_axis_labelsclass HeatDiagramPlot(Scene):def construct(self):@@ -429,7 +429,7 @@ Plotting with Manimx_vals = [0, 8, 38, 39]y_vals = [20, 0, 0, -5]- graph = ax.get_line_graph(x_values=x_vals, y_values=y_vals)+ graph = ax.plot_line_graph(x_values=x_vals, y_values=y_vals)self.add(ax, labels, graph)@@ -440,7 +440,7 @@ Special Camera Settings.. manim:: FollowingGraphCamera:ref_modules: manim.scene.moving_camera_scene:ref_classes: MovingCameraScene MoveAlongPath Restore- :ref_methods: Axes.get_graph Mobject.add_updater+ :ref_methods: Axes.plot Mobject.add_updaterclass FollowingGraphCamera(MovingCameraScene):@@ -449,7 +449,7 @@ Special Camera Settings# create the axes and the curveax = Axes(x_range=[-1, 10], y_range=[-1, 10])- graph = ax.get_graph(lambda x: np.sin(x), color=BLUE, x_range=[0, 3 * PI])+ graph = ax.plot(lambda x: np.sin(x), color=BLUE, x_range=[0, 3 * PI])# create dots based on the graphmoving_dot = Dot(ax.i2gp(graph.t_min, graph), color=ORANGE)diff --git a/manim/mobject/coordinate_systems.py b/manim/mobject/coordinate_systems.pyindex 52c3915e0..be7cd555e 100644--- a/manim/mobject/coordinate_systems.py+++ b/manim/mobject/coordinate_systems.py@@ -91,8 +91,8 @@ class CoordinateSystem:graphs = VGroup()for n in np.arange(1, 20 + 0.5, 0.5):- graphs += grid.get_graph(lambda x: x ** n, color=WHITE)- graphs += grid.get_graph(+ graphs += grid.plot(lambda x: x ** n, color=WHITE)+ graphs += grid.plot(lambda x: x ** (1 / n), color=WHITE, use_smoothing=False)@@ -612,7 +612,7 @@ class CoordinateSystem:# graphing- def get_graph(+ def plot(self,function: Callable[[float], float],x_range: Optional[Sequence[float]] = None,@@ -629,10 +629,10 @@ class CoordinateSystem:Examples--------- .. manim:: GetGraphExample+ .. manim:: PlotExample:save_last_frame:- class GetGraphExample(Scene):+ class PlotExample(Scene):def construct(self):# construct the axesax_1 = Axes(@@ -656,15 +656,15 @@ class CoordinateSystem:return np.log(x)# a curve without adjustments; poor interpolation.- curve_1 = ax_1.get_graph(log_func, color=PURE_RED)+ curve_1 = ax_1.plot(log_func, color=PURE_RED)# disabling interpolation makes the graph look choppy as not enough# inputs are available- curve_2 = ax_2.get_graph(log_func, use_smoothing=False, color=ORANGE)+ curve_2 = ax_2.plot(log_func, use_smoothing=False, color=ORANGE)# taking more inputs of the curve by specifying a step for the# x_range yields expected results, but increases rendering time.- curve_3 = ax_3.get_graph(+ curve_3 = ax_3.plot(log_func, x_range=(0.001, 6, 0.001), color=PURE_GREEN)@@ -709,7 +709,20 @@ class CoordinateSystem:graph.underlying_function = functionreturn graph- def get_implicit_curve(+ @deprecated(+ since="v0.11.0",+ until="v0.13.0",+ replacement="plot",+ )+ def get_graph(+ self,+ function: Callable[[float], float],+ x_range: Optional[Sequence[float]] = None,+ **kwargs,+ ) -> ParametricFunction:+ return self.plot(function, x_range, **kwargs)++ def plot_implicit_curve(self,func: Callable,min_depth: int = 5,@@ -737,7 +750,7 @@ class CoordinateSystem:class ImplicitExample(Scene):def construct(self):ax = Axes()- a = ax.get_implicit_curve(+ a = ax.plot_implicit_curve(lambda x, y: y * (x - y) ** 2 - 4 * x - 8, color=BLUE)self.add(ax, a)@@ -757,7 +770,21 @@ class CoordinateSystem:)return graph- def get_parametric_curve(self, function, **kwargs):+ @deprecated(+ since="v0.11.0",+ until="v0.13.0",+ replacement="plot_implicit_curve",+ )+ def get_implicit_curve(+ self,+ func: Callable,+ min_depth: int = 5,+ max_quads: int = 1500,+ **kwargs,+ ) -> ImplicitFunction:+ return self.plot_implicit_curve(func, min_depth, max_quads, **kwargs)++ def plot_parametric_curve(self, function, **kwargs):dim = self.dimensiongraph = ParametricFunction(lambda t: self.coords_to_point(*function(t)[:dim]), **kwargs@@ -765,6 +792,14 @@ class CoordinateSystem:graph.underlying_function = functionreturn graph+ @deprecated(+ since="v0.11.0",+ until="v0.13.0",+ replacement="plot_parametric_curve",+ )+ def get_parametric_curve(self, function, **kwargs):+ return self.plot_parametric_curve(function, **kwargs)+def input_to_graph_point(self,x: float,@@ -781,7 +816,7 @@ class CoordinateSystem:class InputToGraphPointExample(Scene):def construct(self):ax = Axes()- curve = ax.get_graph(lambda x : np.cos(x))+ curve = ax.plot(lambda x : np.cos(x))# move a square to PI on the cosine curve.position = ax.input_to_graph_point(x=PI, graph=curve)@@ -853,7 +888,7 @@ class CoordinateSystem:class GetGraphLabelExample(Scene):def construct(self):ax = Axes()- sin = ax.get_graph(lambda x: np.sin(x), color=PURPLE_B)+ sin = ax.plot(lambda x: np.sin(x), color=PURPLE_B)label = ax.get_graph_label(graph=sin,label= MathTex(r"\\frac{\\pi}{2}"),@@ -941,7 +976,7 @@ class CoordinateSystem:class GetRiemannRectanglesExample(Scene):def construct(self):ax = Axes(y_range=[-2, 10])- quadratic = ax.get_graph(lambda x: 0.5 * x ** 2 - 0.5)+ quadratic = ax.plot(lambda x: 0.5 * x ** 2 - 0.5)# the rectangles are constructed from their top right corner.# passing an iterable to `color` produces a gradient@@ -959,7 +994,7 @@ class CoordinateSystem:quadratic, x_range=[-1.5, 1.5], dx=0.15, color=YELLOW)- bounding_line = ax.get_graph(+ bounding_line = ax.plot(lambda x: 1.5 * x, color=BLUE_B, x_range=[3.3, 6])bounded_rects = ax.get_riemann_rectangles(@@ -1110,7 +1145,7 @@ class CoordinateSystem:class GetAreaExample(Scene):def construct(self):ax = Axes().add_coordinates()- curve = ax.get_graph(lambda x: 2 * np.sin(x), color=DARK_BLUE)+ curve = ax.plot(lambda x: 2 * np.sin(x), color=DARK_BLUE)area = ax.get_area(curve,x_range=(PI / 2, 3 * PI / 2),@@ -1189,7 +1224,7 @@ class CoordinateSystem:.. code-block:: pythonax = Axes()- curve = ax.get_graph(lambda x: x ** 2)+ curve = ax.plot(lambda x: x ** 2)ax.angle_of_tangent(x=3, graph=curve)# 1.3825747960950903@@ -1225,7 +1260,7 @@ class CoordinateSystem:.. code-block:: pythonax = Axes()- curve = ax.get_graph(lambda x: x ** 2)+ curve = ax.plot(lambda x: x ** 2)ax.slope_of_tangent(x=-2, graph=curve)# -3.5000000259052038@@ -1244,7 +1279,7 @@ class CoordinateSystem:return np.tan(self.angle_of_tangent(x, graph, **kwargs))- def get_derivative_graph(+ def plot_derivative_graph(self, graph: "ParametricFunction", color: Color = GREEN, **kwargs) -> ParametricFunction:"""Returns the curve of the derivative of the passed graph.@@ -1252,15 +1287,15 @@ class CoordinateSystem:Examples--------- .. manim:: GetDerivativeGraphExample+ .. manim:: DerivativeGraphExample:save_last_frame:- class GetDerivativeGraphExample(Scene):+ class DerivativeGraphExample(Scene):def construct(self):ax = NumberPlane(y_range=[-1, 7], background_line_style={"stroke_opacity": 0.4})- curve_1 = ax.get_graph(lambda x: x ** 2, color=PURPLE_B)- curve_2 = ax.get_derivative_graph(curve_1)+ curve_1 = ax.plot(lambda x: x ** 2, color=PURPLE_B)+ curve_2 = ax.plot_derivative_graph(curve_1)curves = VGroup(curve_1, curve_2)label_1 = ax.get_graph_label(curve_1, "x^2", x_val=-2, direction=DL)@@ -1289,7 +1324,17 @@ class CoordinateSystem:def deriv(x):return self.slope_of_tangent(x, graph)- return self.get_graph(deriv, color=color, **kwargs)+ return self.plot(deriv, color=color, **kwargs)++ @deprecated(+ since="v0.11.0",+ until="v0.13.0",+ replacement="plot_derivative_graph",+ )+ def get_derivative_graph(+ self, graph: "ParametricFunction", color: Color = GREEN, **kwargs+ ) -> ParametricFunction:+ return self.plot_derivative_graph(graph, color, **kwargs)def get_secant_slope_group(self,@@ -1316,7 +1361,7 @@ class CoordinateSystem:class GetSecantSlopeGroupExample(Scene):def construct(self):ax = Axes(y_range=[-1, 7])- graph = ax.get_graph(lambda x: 1 / 4 * x ** 2, color=BLUE)+ graph = ax.plot(lambda x: 1 / 4 * x ** 2, color=BLUE)slopes = ax.get_secant_slope_group(x=2.0,graph=graph,@@ -1449,7 +1494,7 @@ class CoordinateSystem:axis_config={"number_scale_value": 0.5},).add_coordinates()- curve = ax.get_graph(lambda x: np.sin(x) / np.e ** 2 * x)+ curve = ax.plot(lambda x: np.sin(x) / np.e ** 2 * x)lines = ax.get_vertical_lines_to_graph(curve, x_range=[0, 4], num_lines=30, color=BLUE@@ -1526,7 +1571,7 @@ class CoordinateSystem:def construct(self):# defines the axes and linear functionaxes = Axes(x_range=[-1, 10], y_range=[-1, 10], x_length=9, y_length=6)- func = axes.get_graph(lambda x: x, color=BLUE)+ func = axes.plot(lambda x: x, color=BLUE)# creates the T_labelt_label = axes.get_T_label(x_val=4, graph=func, label=Tex("x-value"))self.add(axes, func, t_label)@@ -1804,7 +1849,7 @@ class Axes(VGroup, CoordinateSystem, metaclass=ConvertToOpenGL):"""return self.axes- def get_line_graph(+ def plot_line_graph(self,x_values: Iterable[float],y_values: Iterable[float],@@ -1855,7 +1900,7 @@ class Axes(VGroup, CoordinateSystem, metaclass=ConvertToOpenGL):axis_config={"include_numbers": True},)plane.center()- line_graph = plane.get_line_graph(+ line_graph = plane.plot_line_graph(x_values = [0, 1.5, 2, 2.8, 4, 6.25],y_values = [1, 3, 2.25, 4, 2.5, 1.75],line_color=GOLD_E,@@ -1896,6 +1941,33 @@ class Axes(VGroup, CoordinateSystem, metaclass=ConvertToOpenGL):return line_graph+ @deprecated(+ since="v0.11.0",+ until="v0.13.0",+ replacement="plot_line_graph",+ )+ def get_line_graph(+ self,+ x_values: Iterable[float],+ y_values: Iterable[float],+ z_values: Optional[Iterable[float]] = None,+ line_color: Color = YELLOW,+ add_vertex_dots: bool = True,+ vertex_dot_radius: float = DEFAULT_DOT_RADIUS,+ vertex_dot_style: Optional[dict] = None,+ **kwargs,+ ) -> VDict:+ return self.plot_line_graph(+ x_values,+ y_values,+ z_values,+ line_color,+ add_vertex_dots,+ vertex_dot_radius,+ vertex_dot_style,+ **kwargs,+ )+@staticmethoddef _origin_shift(axis_range: Sequence[float]) -> float:"""Determines how to shift graph mobjects to compensate when 0 is not on the axis.diff --git a/manim/scene/moving_camera_scene.py b/manim/scene/moving_camera_scene.pyindex 893e94128..2cd331a85 100644--- a/manim/scene/moving_camera_scene.py+++ b/manim/scene/moving_camera_scene.py@@ -53,7 +53,7 @@ Examplesself.camera.frame.save_state()ax = Axes(x_range=[-1, 10], y_range=[-1, 10])- graph = ax.get_graph(lambda x: np.sin(x), color=WHITE, x_range=[0, 3 * PI])+ graph = ax.plot(lambda x: np.sin(x), color=WHITE, x_range=[0, 3 * PI])dot_1 = Dot(ax.i2gp(graph.t_min, graph))dot_2 = Dot(ax.i2gp(graph.t_max, graph))diff --git a/tests/control_data/graphical_units_data/plot/get_graph.npz b/tests/control_data/graphical_units_data/plot/plot.npzsimilarity index 100%rename from tests/control_data/graphical_units_data/plot/get_graph.npzrename to tests/control_data/graphical_units_data/plot/plot.npzdiff --git a/tests/control_data/graphical_units_data/plot/get_derivative_graph.npz b/tests/control_data/graphical_units_data/plot/plot_derivative_graph.npzsimilarity index 100%rename from tests/control_data/graphical_units_data/plot/get_derivative_graph.npzrename to tests/control_data/graphical_units_data/plot/plot_derivative_graph.npzdiff --git a/tests/control_data/graphical_units_data/plot/get_line_graph.npz b/tests/control_data/graphical_units_data/plot/plot_line_graph.npzsimilarity index 100%rename from tests/control_data/graphical_units_data/plot/get_line_graph.npzrename to tests/control_data/graphical_units_data/plot/plot_line_graph.npzdiff --git a/tests/opengl/test_coordinate_system_opengl.py b/tests/opengl/test_coordinate_system_opengl.pyindex d3e81cade..28d99a3f9 100644--- a/tests/opengl/test_coordinate_system_opengl.py+++ b/tests/opengl/test_coordinate_system_opengl.py@@ -113,8 +113,8 @@ def test_coords_to_point(using_opengl_renderer):def test_input_to_graph_point(using_opengl_renderer):ax = Axes()- curve = ax.get_graph(lambda x: np.cos(x))- line_graph = ax.get_line_graph([1, 3, 5], [-1, 2, -2], add_vertex_dots=False)[+ curve = ax.plot(lambda x: np.cos(x))+ line_graph = ax.plot_line_graph([1, 3, 5], [-1, 2, -2], add_vertex_dots=False)["line_graph"]diff --git a/tests/test_coordinate_system.py b/tests/test_coordinate_system.pyindex bea3536c1..87c2f0395 100644--- a/tests/test_coordinate_system.py+++ b/tests/test_coordinate_system.py@@ -110,8 +110,8 @@ def test_coords_to_point():def test_input_to_graph_point():ax = Axes()- curve = ax.get_graph(lambda x: np.cos(x))- line_graph = ax.get_line_graph([1, 3, 5], [-1, 2, -2], add_vertex_dots=False)[+ curve = ax.plot(lambda x: np.cos(x))+ line_graph = ax.plot_line_graph([1, 3, 5], [-1, 2, -2], add_vertex_dots=False)["line_graph"]diff --git a/tests/test_graphical_units/test_axes.py b/tests/test_graphical_units/test_axes.pyindex 6183d7802..3e8e06250 100644--- a/tests/test_graphical_units/test_axes.py+++ b/tests/test_graphical_units/test_axes.py@@ -20,7 +20,7 @@ def test_axes(scene):@frames_comparisondef test_plot_functions(scene):ax = Axes(x_range=(-10, 10.3), y_range=(-1.5, 1.5))- graph = ax.get_graph(lambda x: x ** 2)+ graph = ax.plot(lambda x: x ** 2)scene.add(ax, graph)@@ -66,17 +66,17 @@ def test_get_y_axis_label(scene):@frames_comparison-def test_get_derivative_graph(scene):+def test_plot_derivative_graph(scene):ax = NumberPlane(y_range=[-1, 7], background_line_style={"stroke_opacity": 0.4})- curve_1 = ax.get_graph(lambda x: x ** 2, color=PURPLE_B)- curve_2 = ax.get_derivative_graph(curve_1)+ curve_1 = ax.plot(lambda x: x ** 2, color=PURPLE_B)+ curve_2 = ax.plot_derivative_graph(curve_1)curves = VGroup(curve_1, curve_2)scene.add(ax, curves)@frames_comparison-def test_get_graph(scene):+def test_plot(scene):# construct the axesax_1 = Axes(x_range=[0.001, 6],@@ -99,15 +99,15 @@ def test_get_graph(scene):return np.log(x)# a curve without adjustments; poor interpolation.- curve_1 = ax_1.get_graph(log_func, color=PURE_RED)+ curve_1 = ax_1.plot(log_func, color=PURE_RED)# disabling interpolation makes the graph look choppy as not enough# inputs are available- curve_2 = ax_2.get_graph(log_func, use_smoothing=False, color=ORANGE)+ curve_2 = ax_2.plot(log_func, use_smoothing=False, color=ORANGE)# taking more inputs of the curve by specifying a step for the# x_range yields expected results, but increases rendering time.- curve_3 = ax_3.get_graph(log_func, x_range=(0.001, 6, 0.001), color=PURE_GREEN)+ curve_3 = ax_3.plot(log_func, x_range=(0.001, 6, 0.001), color=PURE_GREEN)curves = VGroup(curve_1, curve_2, curve_3)@@ -117,7 +117,7 @@ def test_get_graph(scene):@frames_comparisondef test_get_graph_label(scene):ax = Axes()- sin = ax.get_graph(lambda x: np.sin(x), color=PURPLE_B)+ sin = ax.plot(lambda x: np.sin(x), color=PURPLE_B)label = ax.get_graph_label(graph=sin,label=MathTex(r"\frac{\pi}{2}"),@@ -141,7 +141,7 @@ def test_get_lines_to_point(scene):@frames_comparison-def test_get_line_graph(scene):+def test_plot_line_graph(scene):plane = NumberPlane(x_range=(0, 7),y_range=(0, 5),@@ -149,7 +149,7 @@ def test_get_line_graph(scene):axis_config={"include_numbers": True},)- line_graph = plane.get_line_graph(+ line_graph = plane.plot_line_graph(x_values=[0, 1.5, 2, 2.8, 4, 6.25],y_values=[1, 3, 2.25, 4, 2.5, 1.75],line_color=GOLD_E,@@ -167,7 +167,7 @@ def test_get_line_graph(scene):def test_t_label(scene):# defines the axes and linear functionaxes = Axes(x_range=[-1, 10], y_range=[-1, 10], x_length=9, y_length=6)- func = axes.get_graph(lambda x: x, color=BLUE)+ func = axes.plot(lambda x: x, color=BLUE)# creates the T_labelt_label = axes.get_T_label(x_val=4, graph=func, label=Tex("$x$-value"))scene.add(axes, func, t_label)@@ -176,12 +176,12 @@ def test_t_label(scene):@frames_comparisondef test_get_area(scene):ax = Axes().add_coordinates()- curve1 = ax.get_graph(+ curve1 = ax.plot(lambda x: 2 * np.sin(x),x_range=[-5, ax.x_range[1]],color=DARK_BLUE,)- curve2 = ax.get_graph(lambda x: (x + 4) ** 2 - 2, x_range=[-5, -2], color=RED)+ curve2 = ax.plot(lambda x: (x + 4) ** 2 - 2, x_range=[-5, -2], color=RED)area1 = ax.get_area(curve1,x_range=(PI / 2, 3 * PI / 2),@@ -202,7 +202,7 @@ def test_get_area(scene):@frames_comparisondef test_get_riemann_rectangles(scene):ax = Axes(y_range=[-2, 10])- quadratic = ax.get_graph(lambda x: 0.5 * x ** 2 - 0.5)+ quadratic = ax.plot(lambda x: 0.5 * x ** 2 - 0.5)# the rectangles are constructed from their top right corner.# passing an iterable to `color` produces a gradient@@ -223,7 +223,7 @@ def test_get_riemann_rectangles(scene):color=YELLOW,)- bounding_line = ax.get_graph(lambda x: 1.5 * x, color=BLUE_B, x_range=[3.3, 6])+ bounding_line = ax.plot(lambda x: 1.5 * x, color=BLUE_B, x_range=[3.3, 6])bounded_rects = ax.get_riemann_rectangles(bounding_line,bounded_graph=quadratic,@@ -254,6 +254,6 @@ def test_log_scaling_graph(scene):)ax.add_coordinates()- gr = ax.get_graph(lambda x: x, use_smoothing=False, x_range=[0.01, 8])+ gr = ax.plot(lambda x: x, use_smoothing=False, x_range=[0.01, 8])scene.add(ax, gr)diff --git a/tests/test_graphical_units/test_coordinate_systems.py b/tests/test_graphical_units/test_coordinate_systems.pyindex 740e282e5..6b57064f5 100644--- a/tests/test_graphical_units/test_coordinate_systems.py+++ b/tests/test_graphical_units/test_coordinate_systems.py@@ -21,12 +21,12 @@ def test_number_plane(scene):@frames_comparisondef test_line_graph(scene):plane = NumberPlane()- first_line = plane.get_line_graph(+ first_line = plane.plot_line_graph(x_values=[-3, 1],y_values=[-2, 2],line_color=YELLOW,)- second_line = plane.get_line_graph(+ second_line = plane.plot_line_graph(x_values=[0, 2, 2, 4],y_values=[0, 0, 2, 4],line_color=RED,@@ -38,7 +38,7 @@ def test_line_graph(scene):@frames_comparisondef test_implicit_graph(scene):ax = Axes()- graph = ax.get_implicit_curve(lambda x, y: x ** 2 + y ** 2 - 4)+ graph = ax.plot_implicit_curve(lambda x, y: x ** 2 + y ** 2 - 4)scene.add(ax, graph)