W3cubDocs

/Matplotlib 3.5

matplotlib.pyplot.gcf

matplotlib.pyplot.gcf()[source]

Get the current figure.

If there is currently no figure on the pyplot figure stack, a new one is created using figure(). (To test whether there is currently a figure on the pyplot figure stack, check whether get_fignums() is empty.)

© 2012–2021 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/3.5.1/api/_as_gen/matplotlib.pyplot.gcf.html