pyvista.Prop3D.position#

property Prop3D.position: tuple[float, float, float][source]#

Return or set the entity position.

Examples

Change the position of an actor. Note how this does not change the position of the underlying dataset, just the relative location of the actor in the pyvista.Plotter.

>>> import pyvista as pv
>>> mesh = pv.Sphere()
>>> pl = pv.Plotter()
>>> _ = pl.add_mesh(mesh, color='b')
>>> actor = pl.add_mesh(mesh, color='r')
>>> actor.position = (0, 0, 1)  # shifts the red sphere up
>>> pl.show()
../../../_images/pyvista-Prop3D-position-1_00_00.png