pyvista.create_axes_orientation_box

pyvista.create_axes_orientation_box#

create_axes_orientation_box(
line_width=1,
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='red',
y_face_color='green',
z_face_color='blue',
color_box: bool = False,
label_color=None,
labels_off: bool = False,
opacity=0.5,
show_text_edges: bool = False,
)[source]#

Create a Box axes orientation widget with labels.

Parameters:
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.

color_boxbool, optional

Enable or disable the face colors. Otherwise, box is white.

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.

Returns:
vtk.vtkAnnotatedCubeActor

Annotated cube actor.

Examples

Create and plot an orientation box

>>> import pyvista as pv
>>> actor = pv.create_axes_orientation_box(
...     line_width=1,
...     text_scale=0.53,
...     edge_color='black',
...     x_color='k',
...     y_color=None,
...     z_color=None,
...     xlabel='X',
...     ylabel='Y',
...     zlabel='Z',
...     color_box=False,
...     labels_off=False,
...     opacity=1.0,
... )
>>> pl = pv.Plotter()
>>> _ = pl.add_actor(actor)
>>> pl.show()
../../../_images/pyvista-create_axes_orientation_box-1_00_00.png