Plotter.where_is#
- Plotter.where_is(name: str) list[tuple[int, int]][source]#
Return the subplot coordinates of a given actor.
Examples#
Download Python source code | Download Jupyter notebook
>>> import pyvista as pv
>>> pl = pv.Plotter(shape=(2, 2))
>>> pl.subplot(0, 0)
>>> _ = pl.add_mesh(pv.Box(), name='box')
>>> pl.subplot(0, 1)
>>> _ = pl.add_mesh(pv.Sphere(), name='sphere')
>>> pl.subplot(1, 0)
>>> _ = pl.add_mesh(pv.Box(), name='box')
>>> pl.subplot(1, 1)
>>> _ = pl.add_mesh(pv.Cone(), name='cone')
>>> pl.where_is('box')
[(0, 0), (1, 0)]
>>> pl.show()