pyvista.Plotter.remove_legend

pyvista.Plotter.remove_legend#

Plotter.remove_legend(render=True)[source]#

Remove the legend actor.

Parameters:
renderbool, default: True

Render upon actor removal. Set this to False to stop the render window from rendering when a the legend is removed.

Examples

>>> import pyvista as pv
>>> mesh = pv.Sphere()
>>> pl = pv.Plotter()
>>> _ = pl.add_mesh(mesh, label='sphere')
>>> _ = pl.add_legend()
>>> pl.remove_legend()
../../../_images/pyvista-Plotter-remove_legend-1_00_00.png