pyvista.Plotter.set_viewup#

Plotter.set_viewup(vector, reset=True, render=True)[source]#

Set camera viewup vector.

Parameters:
vectorsequence[float]

New camera viewup vector.

resetbool, default: True

Whether to reset the camera after setting the camera position.

renderbool, default: True

If the render window is being shown, trigger a render after setting the viewup.

Examples

Look from the top down by setting view up to [0, 1, 0]. Notice how the y-axis appears vertical.

>>> from pyvista import demos
>>> pl = demos.orientation_plotter()
>>> pl.set_viewup([0, 1, 0])
>>> pl.show()
../../../_images/pyvista-Plotter-set_viewup-1_00_00.png