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)#
Add axes actor at origin.
- Parameters
- x_color
color_like
,optional
The color of the x axes arrow.
- y_color
color_like
,optional
The color of the y axes arrow.
- z_color
color_like
,optional
The color of the z axes arrow.
- xlabel
str
,optional
The label of the x axes arrow.
- ylabel
str
,optional
The label of the y axes arrow.
- zlabel
str
,optional
The label of the z axes arrow.
- line_width
int
,optional
Width of the arrows.
- labels_offbool,
optional
Disables the label text when
True
.
- x_color
- Returns
vtk.vtkAxesActor
Actor of the axes.
Examples
>>> import pyvista >>> pl = pyvista.Plotter() >>> _ = pl.add_mesh(pyvista.Sphere(center=(2, 0, 0)), color='r') >>> _ = pl.add_mesh(pyvista.Sphere(center=(0, 2, 0)), color='g') >>> _ = pl.add_mesh(pyvista.Sphere(center=(0, 0, 2)), color='b') >>> _ = pl.add_axes_at_origin() >>> pl.show()