You are reading an old version of the documentation (v3.0.0). For the latest version see https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.delaxes.html
Version 3.0.0
matplotlib
Fork me on GitHub

matplotlib.pyplot.delaxes

matplotlib.pyplot.delaxes(ax=None)[source]

Remove the Axes ax (defaulting to the current axes) from its figure.

A KeyError is raised if the axes doesn't exist.