Set the current image. This image will be the target of colormap functions like ``pyplot.viridis``, and other functions such as `~.pyplot.clim`. The current image is an attribute of the current Axes.
(self, im)
| 2306 | # Adding and tracking artists |
| 2307 | |
| 2308 | def _sci(self, im): |
| 2309 | """ |
| 2310 | Set the current image. |
| 2311 | |
| 2312 | This image will be the target of colormap functions like |
| 2313 | ``pyplot.viridis``, and other functions such as `~.pyplot.clim`. The |
| 2314 | current image is an attribute of the current Axes. |
| 2315 | """ |
| 2316 | _api.check_isinstance((mcoll.Collection, mimage.AxesImage), im=im) |
| 2317 | if im not in self._children: |
| 2318 | raise ValueError("Argument must be an image or collection in this Axes") |
| 2319 | self._current_image = im |
| 2320 | |
| 2321 | def _gci(self): |
| 2322 | """Helper for `~matplotlib.pyplot.gci`; do not use elsewhere.""" |