matplotlib.pyplot.gci — Matplotlib 3.10.3 documentation (original) (raw)

matplotlib.pyplot.gci()[source]#

Get the current colorable artist.

Specifically, returns the current ScalarMappable instance (Imagecreated by imshow or figimage, Collection created by pcolor orscatter, etc.), or None if no such instance has been defined.

The current image is an attribute of the current Axes, or the nearest earlier Axes in the current figure that contains an image.

Notes

Historically, the only colorable artists were images; hence the namegci (get current image).