pyvista.Plotter.add_box_axes#

Plotter.add_box_axes(
*,
interactive=None,
line_width=2,
text_scale=0.366667,
edge_color='black',
x_color=None,
y_color=None,
z_color=None,
xlabel='X',
ylabel='Y',
zlabel='Z',
x_face_color='white',
y_face_color='white',
z_face_color='white',
label_color=None,
labels_off=False,
opacity=0.5,
show_text_edges=False,
viewport=(0, 0, 0.2, 0.2),
)[source]#

Add an interactive color box axes widget in the bottom left corner.

Parameters:
interactivebool, optional

Enable this orientation widget to be moved by the user.

line_widthfloat, optional

The width of the marker lines.

text_scalefloat, optional

Size of the text relative to the faces.

edge_colorColorLike, optional

Color of the edges.

x_colorColorLike, optional

Color of the x-axis text.

y_colorColorLike, optional

Color of the y-axis text.

z_colorColorLike, optional

Color of the z-axis text.

xlabelstr, optional

Text used for the x-axis.

ylabelstr, optional

Text used for the y-axis.

zlabelstr, optional

Text used for the z-axis.

x_face_colorColorLike, optional

Color used for the x-axis arrow. Defaults to theme axes parameters.

y_face_colorColorLike, optional

Color used for the y-axis arrow. Defaults to theme axes parameters.

z_face_colorColorLike, optional

Color used for the z-axis arrow. Defaults to theme axes parameters.

label_colorColorLike, optional

Color of the labels.

labels_offbool, optional

Enable or disable the text labels for the axes.

opacityfloat, optional

Opacity in the range of [0, 1] of the orientation box.

show_text_edgesbool, optional

Enable or disable drawing the vector text edges.

viewportsequence[float], default: (0, 0, 0.2, 0.2)

Viewport (xstart, ystart, xend, yend) of the widget.

Returns:
vtk.vtkAxesActor

Axes actor.

Examples

Use the axes orientation widget instead of the default arrows.

>>> import pyvista as pv
>>> pl = pv.Plotter()
>>> _ = pl.add_mesh(pv.Sphere())
>>> _ = pl.add_box_axes()
>>> pl.show()
../../../_images/pyvista-Plotter-add_box_axes-1_00_00.png