Renderer.set_position#
- Renderer.set_position(
- point: VectorLikeFloat,
- *,
- reset: bool = False,
- render: bool = True,
Set camera position to a point.
- Parameters:
- point
VectorLikeFloat Cartesian point to focus on in the form of
[x, y, z].- resetbool, default:
False 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 position.
- point
Examples#
Download Python source code | Download Jupyter notebook
Move the camera far away to [7, 7, 7].
>>> import pyvista as pv
>>> mesh = pv.Cube()
>>> pl = pv.Plotter()
>>> _ = pl.add_mesh(mesh, show_edges=True)
>>> pl.set_position([7, 7, 7])
>>> pl.show()