NumberPlane#
Qualified name: manim.mobject.graphing.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.graphing.coordinate_systems.Axes
Creates a cartesian plane with background lines.
- Parameters
x_range (Sequence[float] | None) – The
[x_min, x_max, x_step]
values of the plane in the horizontal direction.y_range (Sequence[float] | None) – The
[y_min, y_max, y_step]
values of the plane in the vertical direction.x_length (float | None) – The width of the plane.
y_length (float | None) – The height of the plane.
background_line_style (dict | None) – Arguments that influence the construction of the background lines of the plane.
faded_line_style (dict | None) – 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 (bool) – Currently non-functional.
kwargs – Additional arguments to be passed to
Axes
.
Note
If
x_length
ory_length
are not defined, the plane automatically adjusts its lengths based on thex_range
andy_range
values to set theunit_size
to 1.Examples
Example: NumberPlaneExample ¶
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 any method of
self
.animation_overrides
color
depth
The depth of the mobject.
fill_color
If there are multiple colors (for gradient) this returns the first one
height
The height of the mobject.
sheen_factor
stroke_color
width
The width of the mobject.