matplotlib.pyplot.
delaxes
Remove an axes from the current figure. If ax doesn’t exist, an error will be raised.
delaxes(): delete the current axes
delaxes()