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

Method add_image

lib/matplotlib/axes/_base.py:2433–2445  ·  view source on GitHub ↗

Add an `.AxesImage` to the Axes; return the image.

(self, image)

Source from the content-addressed store, hash-verified

2431 return collection
2432
2433 def add_image(self, image):
2434 """
2435 Add an `.AxesImage` to the Axes; return the image.
2436 """
2437 _api.check_isinstance(mimage.AxesImage, image=image)
2438 self._set_artist_props(image)
2439 if not image.get_label():
2440 image.set_label(f'_child{len(self._children)}')
2441 self._children.append(image)
2442 image._remove_method = self._children.remove
2443 self.stale = True
2444 image._set_in_autoscale(True)
2445 return image
2446
2447 def _update_image_limits(self, image):
2448 xmin, xmax, ymin, ymax = image.get_extent()

Callers 6

imshowMethod · 0.80
pcolorfastMethod · 0.80
test_nonuniform_logscaleFunction · 0.80

Calls 4

_set_artist_propsMethod · 0.95
_set_in_autoscaleMethod · 0.80
get_labelMethod · 0.45
set_labelMethod · 0.45

Tested by 3

test_nonuniform_logscaleFunction · 0.64