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

Code before:

        v_line = self.get_vertical_line(
            self.i2gp(x_val, graph),
            color=line_color,
            line_func=line_func,
        )

        T_label_group.add(triangle, v_line)

        return T_label_group

    def __matmul__(self, coord: Point3D | Mobject):
        if isinstance(coord, Mobject):
            coord = coord.get_center()
        return self.coords_to_point(*coord)

    def __rmatmul__(self, point: Point3D):
        return self.point_to_coords(point)


class Axes(VGroup, CoordinateSystem, metaclass=ConvertToOpenGL):
    """Creates a set of axes.

    Parameters
    ----------
    x_range
        The ``(x_min, x_max, x_step)`` values of the x-axis.
    y_range
        The ``(y_min, y_max, y_step)`` values of the y-axis.
    x_length
        The length of the x-axis.
    y_length
        The length of the y-axis.
    axis_config
        Arguments to be passed to :class:`~.NumberLine` that influences both axes.
    x_axis_config
        Arguments to be passed to :class:`~.NumberLine` that influence the x-axis.
    y_axis_config
        Arguments to be passed to :class:`~.NumberLine` that influence the y-axis.
    tips
        Whether or not to include the tips on both axes.
    kwargs
        Additional arguments to be passed to :class:`CoordinateSystem` and :class:`~.VGroup`.

    Examples
    --------
    .. manim:: LogScalingExample
        :save_last_frame:

        class LogScalingExample(Scene):
            def construct(self):

Review comment (suggestion):
```suggestion
        return self.coords_to_point(coord)
```
?
Probably a test would be nice

Code after:
        T_label_group = VGroup()
        triangle = RegularPolygon(n=3, start_angle=np.pi / 2, stroke_width=0).set_fill(
            color=triangle_color,
            opacity=1,
        )
        triangle.height = triangle_size
        triangle.move_to(self.coords_to_point(x_val, 0), UP)
        if label is not None:
            t_label = self.x_axis._create_label_tex(label, color=label_color)
            t_label.next_to(triangle, DOWN)
            T_label_group.add(t_label)

        v_line = self.get_vertical_line(
            self.i2gp(x_val, graph),
            color=line_color,
            line_func=line_func,
        )

        T_label_group.add(triangle, v_line)

        return T_label_group

    def __matmul__(self, coord: Point3D | Mobject):
        if isinstance(coord, Mobject):
            coord = coord.get_center()
        return self.coords_to_point(*coord)

    def __rmatmul__(self, point: Point3D):
        return self.point_to_coords(point)


class Axes(VGroup, CoordinateSystem, metaclass=ConvertToOpenGL):
    """Creates a set of axes.

    Parameters
    ----------
    x_range
        The ``(x_min, x_max, x_step)`` values of the x-axis.
    y_range
        The ``(y_min, y_max, y_step)`` values of the y-axis.
    x_length
        The length of the x-axis.
    y_length
        The length of the y-axis.
    axis_config
        Arguments to be passed to :class:`~.NumberLine` that influences both axes.
    x_axis_config
        Arguments to be passed to :class:`~.NumberLine` that influence the x-axis.
    y_axis_config
        Arguments to be passed to :class:`~.NumberLine` that influence the y-axis.
    tips