pyvista.Plotter.add_camera_orientation_widget#

Plotter.add_camera_orientation_widget(animate=True, n_frames=20)[source]#

Add a camera orientation widget to the active renderer.

Note

This widget requires vtk>=9.1.0.

Parameters:
animatebool, default: True

Enable or disable jump-to-axis-view animation.

n_framesint, default: 20

The number of frames to animate the jump-to-axis-viewpoint feature.

Returns:
vtkCameraOrientationWidget

Camera orientation widget.

Examples

Add a camera orientation widget to the scene.

>>> import pyvista as pv
>>> mesh = pv.Cube()
>>> plotter = pv.Plotter()
>>> _ = plotter.add_mesh(
...     mesh, scalars=range(6), show_scalar_bar=False
... )
>>> _ = plotter.add_camera_orientation_widget()
>>> plotter.show()
../../../_images/pyvista-Plotter-add_camera_orientation_widget-1_00_00.png