Renderer.add_orientation_widget(actor, interactive=None, color=None, opacity=1.0)[source]#

Use the given actor in an orientation marker widget.

Color and opacity are only valid arguments if a mesh is passed.

actorvtk.vtkActor or pyvista.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.

colorcolor_like, optional

The color of the actor. This only applies if actor is a pyvista.DataSet.

opacityint or float, optional

Opacity of the marker.


Orientation marker widget.


Use an Arrow as the orientation widget.

>>> import pyvista
>>> pl = pyvista.Plotter()
>>> actor = pl.add_mesh(pyvista.Cube(), show_edges=True)
>>> actor = pl.add_orientation_widget(pyvista.Arrow(), color='r')