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, axis_config=None, y_axis_config=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.

  • axis_config (Optional[dict]) – Arguments to be passed to NumberLine that influences both axes.

  • y_axis_config (Optional[dict]) – Arguments to be passed to NumberLine that influence the y-axis.

  • 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 (Optional[float]) – 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: on the x_range and y_range values to set the unit_size to 1.

  • plane automatically adjusts its lengths based (the) – on the x_range and y_range values to set the unit_size to 1.

Methods

get_axes

Gets the pair of axes.

get_center_point

Gets the origin of NumberPlane.

get_lines

Generate all the lines, faded and not faded.

get_lines_parallel_to_axis

Generate a set of lines parallel to an axis.

get_vector

get_x_unit_size

get_y_unit_size

init_background_lines

Will init all the lines of NumberPlanes (faded or not)

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.

get_axes()[source]

Gets the pair of axes.

Returns

Axes

Return type

VGroup

get_center_point()[source]

Gets the origin of NumberPlane.

Returns

The center point.

Return type

np.ndarray

get_lines()[source]

Generate all the lines, faded and not faded. Two sets of lines are generated: one parallel to the X-axis, and parallel to the Y-axis.

Returns

The first (i.e the non faded lines) and second (i.e the faded lines) sets of lines, respectively.

Return type

Tuple[VGroup, VGroup]

get_lines_parallel_to_axis(axis_parallel_to, axis_perpendicular_to, freq, ratio_faded_lines)[source]

Generate a set of lines parallel to an axis.

Parameters
  • axis_parallel_to (manim.mobject.geometry.Line) – The axis with which the lines will be parallel.

  • axis_perpendicular_to (manim.mobject.geometry.Line) – The axis with which the lines will be perpendicular.

  • ratio_faded_lines (float) – The ratio between the space between faded lines and the space between non-faded lines.

  • freq (float) – Frequency of non-faded lines (number of non-faded lines per graph unit).

Returns

The first (i.e the non-faded lines parallel to axis_parallel_to) and second (i.e the faded lines parallel to axis_parallel_to) sets of lines, respectively.

Return type

Tuple[VGroup, VGroup]

init_background_lines()[source]

Will init all the lines of NumberPlanes (faded or not)