Plotter.add_axes_at_origin

Plotter.add_axes_at_origin#

Plotter.add_axes_at_origin(
*,
x_color: TypeAliasForwardRef('pyvista.ColorLike') | None = None,
y_color: TypeAliasForwardRef('pyvista.ColorLike') | None = None,
z_color: TypeAliasForwardRef('pyvista.ColorLike') | None = None,
xlabel: str = 'X',
ylabel: str = 'Y',
zlabel: str = 'Z',
line_width: int = 2,
labels_off: bool = False,
) vtkAxesActor[source]#

Add axes actor at origin.

Parameters:
x_colorColorLike, optional

The color of the x axes arrow.

y_colorColorLike, optional

The color of the y axes arrow.

z_colorColorLike, optional

The color of the z axes arrow.

xlabelstr, default: “X”

The label of the x axes arrow.

ylabelstr, default: “Y”

The label of the y axes arrow.

zlabelstr, default: “Z”

The label of the z axes arrow.

line_widthint, default: 2

Width of the arrows.

labels_offbool, default: False

Disables the label text when True.

Returns:
vtkAxesActor

Actor of the axes.

Examples#

Download Python source code | Download Jupyter notebook

>>> import pyvista as pv
>>> pl = pv.Plotter()
>>> _ = pl.add_mesh(pv.Sphere(center=(2, 0, 0)), color='r')
>>> _ = pl.add_mesh(pv.Sphere(center=(0, 2, 0)), color='g')
>>> _ = pl.add_mesh(pv.Sphere(center=(0, 0, 2)), color='b')
>>> _ = pl.add_axes_at_origin()
>>> pl.show()
../../../_images/pyvista-Plotter-add_axes_at_origin-e99e13dc2bd8200d_00_00.png

See Also#

add_axes