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

Code before:
        The direction of the azimuth.

        - ``"CW"``: Clockwise.
        - ``"CCW"``: Anti-clockwise.

    azimuth_label_buff
        The buffer for the azimuth labels.

    azimuth_label_scale
        The scale of the azimuth labels.

    radius_config
        The axis config for the radius.

    Examples
    --------

    .. manim:: PolarPlaneExample
        :ref_classes: PolarPlane
        :save_last_frame:

        polarplane_pi = PolarPlane(azimuth_units="PI radians", size=6, azimuth_label_scale=0.75, radius_config={'number_scale_value': 0.75}).add_coordinates()

        class PolarPlaneExample(Scene):
            def construct(self):
                self.add(polarplane_pi)
    """

    def __init__(
        self,
        radius_max: float = config["frame_y_radius"],
        size: Optional[float] = None,
        radius_step: float = 1,
        azimuth_step: Optional[float] = None,
        azimuth_units: Optional[str] = "PI radians",
        azimuth_compact_fraction: bool = True,
        azimuth_offset: float = 0,
        azimuth_direction: str = "CCW",
        azimuth_label_buff: float = SMALL_BUFF,
        azimuth_label_scale: float = 0.5,
        radius_config: Optional[dict] = None,
        background_line_style: Optional[dict] = None,
        faded_line_style: Optional[dict] = None,
        faded_line_ratio: int = 1,
        make_smooth_after_applying_functions: bool = True,
        **kwargs,
    ):

        # error catching
        if azimuth_units in ["PI radians", "TAU radians", "degrees", "gradians", None]:
            self.azimuth_units = azimuth_units

Review comment (suggestion):
To keep consistent with the rest of the docs, polarplane_pi should be defined within the `class PolarPlaneExample`. Also, `polarplane_pi` requires a lot of horizontal scrolling to see fully in the docs, so running black on this example outside of the docstring would be nice

Code after:
        The direction of the azimuth.

        - ``"CW"``: Clockwise.
        - ``"CCW"``: Anti-clockwise.

    azimuth_label_buff
        The buffer for the azimuth labels.

    azimuth_label_scale
        The scale of the azimuth labels.

    radius_config
        The axis config for the radius.

    Examples
    --------

    .. manim:: PolarPlaneExample
        :ref_classes: PolarPlane
        :save_last_frame:

        class PolarPlaneExample(Scene):
            def construct(self):
                polarplane_pi = PolarPlane(
                    azimuth_units="PI radians",
                    size=6,
                    azimuth_label_scale=0.7,
                    radius_config={"number_scale_value": 0.7},
                ).add_coordinates()
                self.add(polarplane_pi)
    """

    def __init__(
        self,
        radius_max: float = config["frame_y_radius"],
        size: Optional[float] = None,
        radius_step: float = 1,
        azimuth_step: Optional[float] = None,
        azimuth_units: Optional[str] = "PI radians",
        azimuth_compact_fraction: bool = True,
        azimuth_offset: float = 0,
        azimuth_direction: str = "CCW",
        azimuth_label_buff: float = SMALL_BUFF,
        azimuth_label_scale: float = 0.5,
        radius_config: Optional[dict] = None,
        background_line_style: Optional[dict] = None,
        faded_line_style: Optional[dict] = None,
        faded_line_ratio: int = 1,
        make_smooth_after_applying_functions: bool = True,
        **kwargs,
    ):