You are reading documentation for the unreleased version of Matplotlib. Try searching for the released version of this page instead?
Version 3.0.2.post1071+g22649b6e8
matplotlib
Fork me on GitHub

matplotlib.axes.Axes.remove

Axes.remove()

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.