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

Code before:
            :save_last_frame:

            class GetZAxisLabelExample(ThreeDScene):
                def construct(self):
                    ax = ThreeDAxes()
                    lab = ax.get_z_axis_label(Tex("$z$-label"))
                    self.set_camera_orientation(phi=2*PI/5, theta=PI/5)
                    self.add(ax, lab)
        """

        positioned_label = self._get_axis_label(
            label, self.get_z_axis(), edge, direction, buff=buff, **kwargs
        )
        positioned_label.rotate(rotation, axis=rotation_axis)
        return positioned_label

    def get_axis_labels(
        self,
        x_label: float | str | Mobject = "x",
        y_label: float | str | Mobject = "y",
        z_label: float | str | Mobject = "z",
    ) -> VGroup:
        """Defines labels for the x_axis and y_axis of the graph.

        For increased control over the position of the labels,
        use :meth:`get_x_axis_label` and :meth:`get_y_axis_label`.

        Parameters
        ----------
        x_label
            The label for the x_axis. Defaults to :class:`~.MathTex` for ``str`` and ``float`` inputs.
        y_label
            The label for the y_axis. Defaults to :class:`~.MathTex` for ``str`` and ``float`` inputs.
        z_label
            The label for the z_axis. Defaults to :class:`~.MathTex` for ``str`` and ``float`` inputs.

        Returns
        -------
        :class:`~.VGroup`
            A :class:`~.Vgroup` of the labels for the x_axis, y_axis and z_axis.


        .. seealso::
            :class:`get_x_axis_label`
            :class:`get_y_axis_label`
            :class:`get_z_axis_label`

        Examples
        --------
        .. manim:: GetAxisLabelsExample
            :save_last_frame:

Review comment (suggestion):
```suggestion
        use :meth:`.get_x_axis_label` and :meth:`.get_y_axis_label`.
```

Code after:
            :save_last_frame:

            class GetZAxisLabelExample(ThreeDScene):
                def construct(self):
                    ax = ThreeDAxes()
                    lab = ax.get_z_axis_label(Tex("$z$-label"))
                    self.set_camera_orientation(phi=2*PI/5, theta=PI/5)
                    self.add(ax, lab)
        """

        positioned_label = self._get_axis_label(
            label, self.get_z_axis(), edge, direction, buff=buff, **kwargs
        )
        positioned_label.rotate(rotation, axis=rotation_axis)
        return positioned_label

    def get_axis_labels(
        self,
        x_label: float | str | Mobject = "x",
        y_label: float | str | Mobject = "y",
        z_label: float | str | Mobject = "z",
    ) -> VGroup:
        """Defines labels for the x_axis and y_axis of the graph.

        For increased control over the position of the labels,
        use :meth:`.get_x_axis_label` and :meth:`.get_y_axis_label`.

        Parameters
        ----------
        x_label
            The label for the x_axis. Defaults to :class:`~.MathTex` for ``str`` and ``float`` inputs.
        y_label
            The label for the y_axis. Defaults to :class:`~.MathTex` for ``str`` and ``float`` inputs.
        z_label
            The label for the z_axis. Defaults to :class:`~.MathTex` for ``str`` and ``float`` inputs.

        Returns
        -------
        :class:`~.VGroup`
            A :class:`~.VGroup` of the labels for the x_axis, y_axis, and z_axis.


        .. seealso::
            :meth:`.get_x_axis_label`
            :meth:`.get_y_axis_label`
            :meth:`.get_z_axis_label`

        Examples
        --------
        .. manim:: GetAxisLabelsExample
            :save_last_frame: