Plotter.clear_actors

Plotter.clear_actors#

Plotter.clear_actors() → None[source]#

Clear actors from all renderers.

Examples#

Download Python source code | Download Jupyter notebook

Add a mesh to each subplot, then remove both actors.

>>> import pyvista as pv
>>> pl = pv.Plotter(shape=(1, 2))
>>> pl.subplot(0, 0)
>>> _ = pl.add_mesh(pv.Sphere())
>>> pl.subplot(0, 1)
>>> _ = pl.add_mesh(pv.Cube())
>>> [bool(renderer.actors) for renderer in pl.renderers]
[True, True]
>>> pl.clear_actors()
>>> [bool(renderer.actors) for renderer in pl.renderers]
[False, False]