pyvista.Plotter.enable_2d_style#

Plotter.enable_2d_style()[source]#

Set the interactive style to 2D.

For a 3-button mouse, the left button pans, the right button dollys, the middle button spins, and the wheel dollys. ctrl + left button spins, shift + left button dollys, ctrl + middle button pans, shift + middle button dollys, ctrl + right button rotates in 3D, and shift + right button dollys.

Recommended to use with pyvista.Plotter.enable_parallel_projection().

Examples

Create a simple scene with a plotter that has the ParaView-like 2D 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_parallel_projection()
>>> plotter.enable_2d_style()
>>> plotter.show()