Matplotlib Helpers. What 'Gcf' stands for?

I am playing around building my own backend for matplotlib and I was reading the repo and how the module manages the figures.

Tuns out that the figures are kept under a class variable called figs, where the name of the class is Gcf. See in the repo:

My question is: What Gcf stands for?

My guesses:

garbage collection figure
graphic canvas figure
Global …

Any idea?

I assume that’s comes from plt.gcf() which stands for “get current figure” matplotlib.pyplot.gcf — Matplotlib 3.3.3 documentation, because it implements the figure management features that plt.gcf() requires.

And yes, I agree it’s bad naming. But it’s always been there and changing the name would break a number of downstream libraries.

1 Like

Thanks for the reply.
Looking at the history of the commits, that object has been there since at least 17 years. I respect any piece of code that was written before iPhone.

I also thought about the get current figure function, but I was not expecting the name of a class (object) to be an action.

I consider this mystery solved, but I would love to know if anybody else has yet another guess.

Thanks again

That name has been there since the mid 1980s!