Repository: ManimCommunity/manim
File: manim/mobject/coordinate_systems.py (Python)

Code before:
            The plotted curve.
        """

        t_range = np.array(self.x_range, dtype=float)
        if x_range is not None:
            t_range[: len(x_range)] = x_range

        if x_range is None or len(x_range) < 3:
            # if t_range has a defined step size, increase the number of sample points per tick
            t_range[2] /= self.num_sampled_graph_points_per_tick
        # For axes, the third coordinate of x_range indicates
        # tick frequency.  But for functions, it indicates a
        # sample frequency
        graph = ParametricFunction(
            lambda t: self.coords_to_point(t, function(t)), t_range=t_range, **kwargs
        )
        graph.underlying_function = function
        return graph

    def get_implicit_curve(
        self,
        func: Callable,
        min_depth: int = 5,
        max_quads: int = 1500,
        use_smoothing: bool = True,
        color: Color = WHITE,
        **kwargs,
    ) -> ImplicitFunction:
        """Creates the curves of an implicit function.

        Parameters
        ----------
        func
            The function to graph, in the form of f(x, y) = 0.
        min_depth
            The minimum depth of the function to calculate.
        max_quads
            The maximum number of quads to use.
        use_smoothing
            Whether or not to smoothen the curves.
        color
            The color of the graph.
        kwargs
            Additional parameters to pass into :class:`VMobject`

        Examples
        --------
        .. manim:: ImplicitExample
            :save_last_frame:

            class ImplicitExample(Scene):

Review comment (suggestion):
Is it necessary to specify a colour + `use_smoothing` parameter since it'll be passed through `*kwargs` either way? Also, the default colour is white either way.

Code after:
        :class:`~.ParametricFunction`
            The plotted curve.
        """

        t_range = np.array(self.x_range, dtype=float)
        if x_range is not None:
            t_range[: len(x_range)] = x_range

        if x_range is None or len(x_range) < 3:
            # if t_range has a defined step size, increase the number of sample points per tick
            t_range[2] /= self.num_sampled_graph_points_per_tick
        # For axes, the third coordinate of x_range indicates
        # tick frequency.  But for functions, it indicates a
        # sample frequency
        graph = ParametricFunction(
            lambda t: self.coords_to_point(t, function(t)), t_range=t_range, **kwargs
        )
        graph.underlying_function = function
        return graph

    def get_implicit_curve(
        self,
        func: Callable,
        min_depth: int = 5,
        max_quads: int = 1500,
        **kwargs,
    ) -> ImplicitFunction:
        """Creates the curves of an implicit function.

        Parameters
        ----------
        func
            The function to graph, in the form of f(x, y) = 0.
        min_depth
            The minimum depth of the function to calculate.
        max_quads
            The maximum number of quads to use.
        kwargs
            Additional parameters to pass into :class:`ImplicitFunction`

        Examples
        --------
        .. manim:: ImplicitExample
            :save_last_frame:

            class ImplicitExample(Scene):
                def construct(self):
                    ax = Axes()
                    a = ax.get_implicit_curve(
                        lambda x, y: y * (x - y) ** 2 - 4 * x - 8, color=BLUE
                    )