manim.mobject.coordinate_systems.ComplexPlane

class ComplexPlane(color='#58C4DD', **kwargs)[source]

Bases: manim.mobject.coordinate_systems.NumberPlane

Examples

Example: ComplexPlaneExample

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

class ComplexPlaneExample(Scene):
    def construct(self):
        plane = ComplexPlane().add_coordinates()
        self.add(plane)
        d1 = Dot(plane.n2p(2 + 1j), color=YELLOW)
        d2 = Dot(plane.n2p(-3 - 2j), color=YELLOW)
        label1 = MathTex("2+i").next_to(d1, UR, 0.1)
        label2 = MathTex("-3-2i").next_to(d2, UR, 0.1)
        self.add(
            d1,
            label1,
            d2,
            label2,
        )

References: Dot MathTex

Methods

add_coordinates

Adds labels to the axes.

get_coordinate_labels

get_default_coordinate_values

n2p

number_to_point

p2n

point_to_number

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.

add_coordinates(*numbers)[source]

Adds labels to the axes.

axes_numbers

The numbers to be added to the axes. Use None to represent an axis with default labels.

Examples

ax = ThreeDAxes()
x_labels = range(-4, 5)
z_labels = range(-4, 4, 2)
ax.add_coordinates(x_labels, None, z_labels)  # default y labels, custom x & z labels
ax.add_coordinates(x_labels)  # only x labels
Returns

A VGroup of the number mobjects.

Return type

VGroup