MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / _sci

Method _sci

lib/matplotlib/axes/_base.py:2308–2319  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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."""

Callers 1

sciFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected