pyvista.Plotter.where_is#

Plotter.where_is(name)[source]#

Return the subplot coordinates of a given actor.

Parameters:
namestr

Actor’s name.

Returns:
list[tuple[numpy.int64, numpy.int64]]

A list with the subplot coordinates of the actor.

Examples

>>> import pyvista as pv
>>> plotter = pv.Plotter(shape=(2, 2))
>>> plotter.subplot(0, 0)
>>> _ = plotter.add_mesh(pv.Box(), name='box')
>>> plotter.subplot(0, 1)
>>> _ = plotter.add_mesh(pv.Sphere(), name='sphere')
>>> plotter.subplot(1, 0)
>>> _ = plotter.add_mesh(pv.Box(), name='box')
>>> plotter.subplot(1, 1)
>>> _ = plotter.add_mesh(pv.Cone(), name='cone')
>>> plotter.where_is('box')
[(0, 0), (1, 0)]
>>> plotter.show()
../../../_images/pyvista-Plotter-where_is-1_00_00.png