Plotter.unlink_views#
- Plotter.unlink_views(views: int | Iterable[int] | None = None) None[source]#
Unlink the views’ cameras.
Examples#
Download Python source code | Download Jupyter notebook
Link two subplots so they share a camera.
>>> import pyvista as pv
>>> pl = pv.Plotter(shape=(1, 2))
>>> _ = pl.add_mesh(pv.Cone())
>>> left_camera = pl.camera
>>> pl.subplot(0, 1)
>>> _ = pl.add_mesh(pv.Cone())
>>> pl.link_views()
>>> pl.camera is left_camera
True
Unlink the right subplot to adjust its camera independently.
>>> pl.unlink_views(1)
>>> pl.camera is left_camera
False
>>> left_camera.view_angle = 30.0
>>> pl.camera.view_angle = 15.0
>>> left_camera.view_angle
30.0
>>> pl.camera.view_angle
15.0