pyvista.Renderer.add_box_axes#
- Renderer.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),
 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_width
float,optional The width of the marker lines.
- text_scale
float,optional Size of the text relative to the faces.
- edge_color
ColorLike,optional Color of the edges.
- x_color
ColorLike,optional Color of the x-axis text.
- y_color
ColorLike,optional Color of the y-axis text.
- z_color
ColorLike,optional Color of the z-axis text.
- xlabel
str,optional Text used for the x-axis.
- ylabel
str,optional Text used for the y-axis.
- zlabel
str,optional Text used for the z-axis.
- x_face_color
ColorLike,optional Color used for the x-axis arrow. Defaults to theme axes parameters.
- y_face_color
ColorLike,optional Color used for the y-axis arrow. Defaults to theme axes parameters.
- z_face_color
ColorLike,optional Color used for the z-axis arrow. Defaults to theme axes parameters.
- label_color
ColorLike,optional Color of the labels.
- labels_offbool, 
optional Enable or disable the text labels for the axes.
- opacity
float,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.
- interactivebool, 
 - Returns:
 - vtkAnnotatedCubeActor
 Axes actor.
See also
add_axesAdd arrow-style axes as an orientation widget.
add_north_arrow_widgetAdd north arrow as an orientation widget.
add_orientation_widgetAdd any actor as an orientation widget.
- Axes Objects
 Example showing different axes objects.
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()