Matplotlib offers there functions:
cla() # Clear axis clf() # Clear figure close() # Close a figure window
The documentation doesn\'t o
plt.cla() means clear current axis
plt.clf() means clear current figure
also, there's plt.gca() (get current axis) and plt.gcf() (get current figure)
Read more here: Matplotlib, Pyplot, Pylab etc: What's the difference between these and when to use each?