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

Code before:
    line_to_number_buff : :class:`float`
        The distance between the line and the number mobject.
    decimal_number_config : :class:`dict`
        Arguments that can be passed to :class:`~.numbers.DecimalNumber` to influence number mobjects.
    numbers_to_exclude : Union[:class:`list`, :class:`numpy.ndarray`]
        An explicit list of numbers to not be added to the line.
    number_scale_value : :class:`float`
        The size scaling factor for the number mobjects.
    kwargs : Any
        Additional arguments to be passed to :class:`~.Line`.

    Examples
    --------
    .. manim:: NumLineExample
        :save_last_frame:
        class NumLineExample(Scene):
            def construct(self):
                l0 = NumberLine(x_range=[-10, 10, 2], length=10, color=BLUE, include_numbers=True, label_direction=UP)
                l0.shift(2 * UP)

                l1 = NumberLine(x_range=[-10, 10, 2], unit_size=0.5, numbers_with_elongated_ticks=[-2, 4], include_numbers=True, number_scale_value=0.5)
                l1.shift(UP)
                num6 = l1.get_number_mobject(6).set_color(RED)

                l2 = NumberLine(
                    x_range=[-2.5, 2.5 + 0.5, 0.5], length=12, decimal_number_config={"num_decimal_places": 2}, unit_size=1.25, include_numbers=True
                )
                l2.shift(DOWN)

                l3 = NumberLine(x_range=[-5, 5 + 1, 1], length=6, include_tip=True, include_numbers=True, rotation=10 * DEGREES)
                l3.shift(2.75 * DOWN)

                self.add(l0, l1, num6, l2, l3)

    Returns
    -------
    NumberLine
        The constructed number line.
    """

    def __init__(
        self,
        x_range=None,  # must be first
        length=None,
        unit_size=1,
        # ticks
        include_ticks=True,
        tick_size=0.1,
        numbers_with_elongated_ticks=None,
        longer_tick_multiple=2,
        # visuals

Review comment (suggestion):
`length` technically overrides `unit_size` when they're used together. So you should probably chose only one for this line.

Code after:
    line_to_number_buff : :class:`float`
        The distance between the line and the number mobject.
    decimal_number_config : :class:`dict`
        Arguments that can be passed to :class:`~.numbers.DecimalNumber` to influence number mobjects.
    numbers_to_exclude : Union[:class:`list`, :class:`numpy.ndarray`]
        An explicit list of numbers to not be added to the line.
    number_scale_value : :class:`float`
        The size scaling factor for the number mobjects.
    kwargs : Any
        Additional arguments to be passed to :class:`~.Line`.

    Examples
    --------
    .. manim:: NumberLineExample
        :save_last_frame:

        class NumberLineExample(Scene):
            def construct(self):
                l0 = NumberLine(
                    x_range=[-10, 10, 2],
                    length=10,
                    color=BLUE,
                    include_numbers=True,
                    label_direction=UP,
                )

                l1 = NumberLine(
                    x_range=[-10, 10, 2],
                    unit_size=0.5,
                    numbers_with_elongated_ticks=[-2, 4],
                    include_numbers=True,
                    number_scale_value=0.5,
                )
                [num6] = [num for num in l1.numbers if num.number == 6]
                num6.set_color(RED)
                l1.add(num6)

                l2 = NumberLine(
                    x_range=[-2.5, 2.5 + 0.5, 0.5],
                    length=12,
                    decimal_number_config={"num_decimal_places": 2},
                    include_numbers=True,
                )

                l3 = NumberLine(
                    x_range=[-5, 5 + 1, 1],
                    length=6,
                    include_tip=True,
                    include_numbers=True,
                    rotation=10 * DEGREES,
                )