matplotlib Closing a figure window

30% OFF - 9th Anniversary discount on Entity Framework Extensions until December 15 with code: ZZZANNIVERSARY9


  • 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

Got any matplotlib Question?