ThreeDAxes

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

class ThreeDAxes(x_range=(- 6, 6, 1), y_range=(- 5, 5, 1), z_range=(- 4, 4, 1), x_length=10.5, y_length=10.5, z_length=6.5, z_axis_config=None, z_normal=array([0., - 1., 0.]), num_axis_pieces=20, light_source=array([- 7., - 9., 10.]), depth=None, gloss=0.5, **kwargs)[source]

Bases: manim.mobject.coordinate_systems.Axes

A 3-dimensional set of axes.

Parameters
  • x_range (Optional[Sequence[float]]) – The [x_min, x_max, x_step] values of the x-axis.

  • y_range (Optional[Sequence[float]]) – The [y_min, y_max, y_step] values of the y-axis.

  • z_range (Optional[Sequence[float]]) – The [z_min, z_max, z_step] values of the z-axis.

  • x_length (Optional[float]) – The length of the x-axis.

  • y_length (Optional[float]) – The length of the y-axis.

  • z_length (Optional[float]) – The length of the z-axis.

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

  • z_normal (Sequence[float]) – The direction of the normal.

  • num_axis_pieces (int) – The number of pieces used to construct the axes.

  • light_source (Sequence[float]) – The direction of the light source.

  • depth – Currently non-functional.

  • gloss – Currently non-functional.

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

Methods

get_z_axis_label

Generate an x-axis label.

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_z_axis_label(label, edge=array([0., 0., 1.]), direction=array([1., 0., 0.]), buff=0.1, rotation=1.5707963267948966, rotation_axis=array([1., 0., 0.]), **kwargs)[source]

Generate an x-axis label.

Examples

Example: GetZAxisLabelExample

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

class GetZAxisLabelExample(ThreeDScene):
    def construct(self):
        ax = ThreeDAxes()
        lab = ax.get_z_axis_label(Tex("$z$-label"))
        self.set_camera_orientation(phi=2*PI/5, theta=PI/5)
        self.add(ax, lab)
Parameters
  • label (Union[float, str, manim.mobject.mobject.Mobject]) – The label. Defaults to MathTex for str and float inputs.

  • edge (Sequence[float]) – The edge of the x-axis to which the label will be added, by default UR.

  • direction (Sequence[float]) – Allows for further positioning of the label from an edge, by default UR.

  • buff (float) – The distance of the label from the line.

  • rotation – The angle at which to rotate the label, by default PI/2.

  • rotation_axis – The axis about which to rotate the label, by default RIGHT.

Returns

The positioned label.

Return type

Mobject