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 iscreated usingfigure(). (To test whether there is currently afigure on the pyplot figure stack, check whetherget_fignums()is empty.)

On this page