Camera.up

Contents

Camera.up#

property Camera.up[source]#

Return or set the “up” of the camera.

The vector is normalized, so it must have a non-zero magnitude.

Changed in version 0.49: Setting a zero-length vector now raises a ValueError. Previously it was silently replaced with (0, 1, 0) by VTK.

Examples#

Download Python source code | Download Jupyter notebook

>>> import pyvista as pv
>>> pl = pv.Plotter()
>>> pl.camera.up
(0.0, 0.0, 1.0)
>>> pl.camera.up = (0.410018, 0.217989, 0.885644)
>>> pl.camera.up
(0.410018, 0.217989, 0.885644)