NumberPlane

Qualified name: manim.mobject.coordinate\_systems.NumberPlane

class NumberPlane(x_range=(- 7.111111111111111, 7.111111111111111, 1), y_range=(- 4.0, 4.0, 1), x_length=None, y_length=None, background_line_style=None, faded_line_style=None, faded_line_ratio=1, make_smooth_after_applying_functions=True, **kwargs)[source]

Bases: manim.mobject.coordinate_systems.Axes

Creates a cartesian plane with background lines.

Parameters
  • x_range (Optional[Sequence[float]]) – The [x_min, x_max, x_step] values of the plane in the horizontal direction.

  • y_range (Optional[Sequence[float]]) – The [y_min, y_max, y_step] values of the plane in the vertical direction.

  • x_length (Optional[float]) – The width of the plane.

  • y_length (Optional[float]) – The height of the plane.

  • background_line_style (Optional[dict]) – Arguments that influence the construction of the background lines of the plane.

  • faded_line_style (Optional[dict]) – Similar to background_line_style, affects the construction of the scene’s background lines.

  • faded_line_ratio (int) – Determines the number of boxes within the background lines: 2 = 4 boxes, 3 = 9 boxes.

  • make_smooth_after_applying_functions – Currently non-functional.

  • kwargs (Any) – Additional arguments to be passed to Axes.

Note

If x_length or y_length are not defined, the plane automatically adjusts its lengths based on the x_range and y_range values to set the unit_size to 1.

Examples

Example: NumberPlaneExample

../_images/NumberPlaneExample-1.png
from manim import *

class NumberPlaneExample(Scene):
    def construct(self):
        number_plane = NumberPlane(
            x_range=[-10, 10, 1],
            y_range=[-10, 10, 1],
            background_line_style={
                "stroke_color": TEAL,
                "stroke_width": 4,
                "stroke_opacity": 0.6
            }
        )
        self.add(number_plane)

Methods

get_vector

prepare_for_nonlinear_transform

Attributes

animate

Used to animate the application of a method.

animation_overrides

depth

The depth of the mobject.

height

The height of the mobject.

width

The width of the mobject.