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

Method set_data

lib/matplotlib/image.py:697–711  ·  view source on GitHub ↗

Set the image array. Note that this function does *not* update the normalization used. Parameters ---------- A : array-like or `PIL.Image.Image`

(self, A)

Source from the content-addressed store, hash-verified

695 return A
696
697 def set_data(self, A):
698 """
699 Set the image array.
700
701 Note that this function does *not* update the normalization used.
702
703 Parameters
704 ----------
705 A : array-like or `PIL.Image.Image`
706 """
707 if isinstance(A, PIL.Image.Image):
708 A = pil_to_array(A) # Needed e.g. to apply png palette.
709 self._A = self._normalize_image_array(A)
710 self._imcache = None
711 self.stale = True
712
713 def set_array(self, A):
714 """

Callers 2

set_arrayMethod · 0.95
set_dataMethod · 0.45

Calls 2

pil_to_arrayFunction · 0.85

Tested by

no test coverage detected