pyvista.RenderWindowInteractor.enable_rubber_band_style#
- RenderWindowInteractor.enable_rubber_band_style()[source]#
Set the interactive style to Rubber Band Picking.
This interactor style allows the user to draw a rectangle in the render window by hitting
r
and then using the left mouse button. When the mouse button is released, the attached picker operates on the pixel in the center of the selection rectangle. If the picker happens to be avtkAreaPicker
it will operate on the entire selection rectangle. When thep
key is hit the above pick operation occurs on a 1x1 rectangle. In other respects it behaves the same as the Trackball Camera style.Examples
Create a simple scene with a plotter that has the Rubber Band Pick 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_rubber_band_style() >>> plotter.show()