In MatPlotLib, I can use:
plt.gcf().clear()
To clear the contents of the current figure.
But suppose I have two figures, created with:
fig1 = plt.figure(1)
fig2 = plt.figure(2)
How can I clear a specific figure based on its number?
In MatPlotLib, I can use:
plt.gcf().clear()
To clear the contents of the current figure.
But suppose I have two figures, created with:
fig1 = plt.figure(1)
fig2 = plt.figure(2)
How can I clear a specific figure based on its number?