pyvista.Plotter.add_axes_at_origin

pyvista.Plotter.add_axes_at_origin#

Plotter.add_axes_at_origin(
x_color=None,
y_color=None,
z_color=None,
xlabel='X',
ylabel='Y',
zlabel='Z',
line_width=2,
labels_off=False,
)[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:
vtk.vtkAxesActor

Actor of the axes.

Examples

>>> 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-1_00_00.png