pyvista.Plotter.enable_trackball_style#
- Plotter.enable_trackball_style()[source]#
Set the interactive style to Trackball Camera.
The trackball camera is the default interactor style. Moving the mouse moves the camera around, leaving the scene intact.
For a 3-button mouse, the left button is for rotation, the right button for zooming, the middle button for panning, and ctrl + left button for spinning the view around the viewing axis of the camera. Alternatively, ctrl + shift + left button or mouse wheel zooms, and shift + left button pans.
See also
pyvista.Plotter.enable_custom_trackball_style
A style that can be customized for mouse actions.
Examples
Create a simple scene with a plotter that has the Trackball Camera interactive style (which is also the default):
>>> import pyvista as pv >>> plotter = pv.Plotter() >>> _ = plotter.add_mesh(pv.Cube(center=(1, 0, 0))) >>> _ = plotter.add_mesh(pv.Cube(center=(0, 1, 0))) >>> plotter.show_axes() >>> plotter.enable_trackball_style() >>> plotter.show()