pyvista.Renderer.set_focus

pyvista.Renderer.set_focus#

Renderer.set_focus(point)[source]#

Set focus to a point.

Parameters:
pointsequence[float]

Cartesian point to focus on in the form of [x, y, z].

Examples

>>> import pyvista as pv
>>> mesh = pv.Cube()
>>> pl = pv.Plotter()
>>> _ = pl.add_mesh(mesh, show_edges=True)
>>> _ = pl.add_point_labels([mesh.points[1]], ["Focus"])
>>> _ = pl.camera  # this initializes the camera
>>> pl.set_focus(mesh.points[1])
>>> pl.show()
../../../_images/pyvista-Renderer-set_focus-1_00_00.png