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(int))

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()
https://d33wubrfki0l68.cloudfront.net/e6e23003ad570981232ea360b1d0be2f75518265/783de/_images/pyvista-plotter-where_is-1_00_00.png