Get the current colorable artist. Specifically, returns the current :class:`~matplotlib.cm.ScalarMappable` instance (image or patch collection), or *None* if no images or patch collections have been defined. The commands :func:`~matplotlib.pyplot.imshow` and :func:`~matplotlib
()
| 318 | |
| 319 | |
| 320 | def gci(): |
| 321 | """ |
| 322 | Get the current colorable artist. Specifically, returns the |
| 323 | current :class:`~matplotlib.cm.ScalarMappable` instance (image or |
| 324 | patch collection), or *None* if no images or patch collections |
| 325 | have been defined. The commands :func:`~matplotlib.pyplot.imshow` |
| 326 | and :func:`~matplotlib.pyplot.figimage` create |
| 327 | :class:`~matplotlib.image.Image` instances, and the commands |
| 328 | :func:`~matplotlib.pyplot.pcolor` and |
| 329 | :func:`~matplotlib.pyplot.scatter` create |
| 330 | :class:`~matplotlib.collections.Collection` instances. The |
| 331 | current image is an attribute of the current axes, or the nearest |
| 332 | earlier axes in the current figure that contains an image. |
| 333 | """ |
| 334 | return gcf()._gci() |
| 335 | |
| 336 | |
| 337 | ## Any Artist ## |