W3cubDocs

/Matplotlib 3.5

matplotlib.artist.Artist.remove

Artist.remove()[source]

Remove the artist from the figure if possible.

The effect will not be visible until the figure is redrawn, e.g., with FigureCanvasBase.draw_idle. Call relim to update the axes limits if desired.

Note: relim will not see collections even if the collection was added to the axes with autolim = True.

Note: there is no support for removing the artist's legend entry.

© 2012–2021 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/3.5.1/api/_as_gen/matplotlib.artist.Artist.remove.html