matplotlibClosing a figure window


Syntax

  • plt.close() # closes the current active figure
  • plt.close(fig) # closes the figure with handle 'fig'
  • plt.close(num) # closes the figure number 'num'
  • plt.close(name) # closes the figure with the label 'name'
  • plt.close('all') # closes all figures