Let's say i did
figure(1) plot(...) figure(2) plot(...)
and I want to create a third figure and show only it. so that:
figure(1) plot(...) figure(2) plot(...) somemagicFuncToFlushFigures() figure(3) plot(...) show()
only the third pattern will be displayed. How to do it?
Do you want to close the numbers exactly? I wonder if the following helps?
import matplotlib.pyplot as plt plt.close()
UPDATE : As @jorgeca says, to close all the shapes, try using plt.close('all')
plt.close('all')