You are reading documentation for the unreleased version of Matplotlib. Try searching for the released version of this page instead?
Version 2.0.0b1.post7580.dev0+ge487118
matplotlib
Fork me on GitHub

Table Of Contents

This Page

matplotlib.pyplot.close

matplotlib.pyplot.close(*args)

Close a figure window.

close() by itself closes the current figure

close(fig) closes the Figure instance fig

close(num) closes the figure number num

close(name) where name is a string, closes figure with that label

close('all') closes all the figure windows

Examples using matplotlib.pyplot.close