You are reading an old version of the documentation (v2.2.3). For the latest version see https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.close.html
Version 2.2.3
matplotlib
Fork me on GitHub

Table Of Contents

matplotlib.pyplot.close

matplotlib.pyplot.close(*args)[source]

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