pyvista.Plotter.enable_zoom_style#

Plotter.enable_zoom_style()[source]#

Set the interactive style to Rubber Band Zoom.

This interactor style allows the user to draw a rectangle in the render window using the left mouse button. When the mouse button is released, the current camera zooms by an amount determined from the shorter side of the drawn rectangle.

Examples

Create a simple scene with a plotter that has the Rubber Band Zoom interactive style:

>>> 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_zoom_style()
>>> plotter.show()