pyvista.Plotter.add_orientation_widget#
- Plotter.add_orientation_widget(
 - actor,
 - interactive=None,
 - color=None,
 - opacity=1.0,
 - viewport=None,
 Use the given actor in an orientation marker widget.
Color and opacity are only valid arguments if a mesh is passed.
- Parameters:
 - actorvtkActor | 
DataSet The mesh or actor to use as the marker.
- interactivebool, 
optional Control if the orientation widget is interactive. By default uses the value from
pyvista.global_theme.interactive.- color
ColorLike,optional The color of the actor. This only applies if
actoris apyvista.DataSet.- opacity
int|float, default: 1.0 Opacity of the marker.
- viewportsequence[
float],optional Viewport
(xstart, ystart, xend, yend)of the widget.
- actorvtkActor | 
 - Returns:
 - vtkOrientationMarkerWidget
 Orientation marker widget.
See also
add_axesAdd arrow-style axes as an orientation widget.
add_box_axesAdd an axes box as an orientation widget.
add_north_arrow_widgetAdd north arrow as an orientation widget.
- Axes Objects
 Example showing different axes objects.
Examples
Use an Arrow as the orientation widget.
>>> import pyvista as pv >>> pl = pv.Plotter() >>> actor = pl.add_mesh(pv.Cube(), show_edges=True) >>> widget = pl.add_orientation_widget(pv.Arrow(), color='r') >>> pl.show()