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

Method __init__

lib/matplotlib/image.py:1215–1252  ·  view source on GitHub ↗

Parameters ---------- ax : `~matplotlib.axes.Axes` The Axes the image will belong to. x, y : 1D array-like, optional Monotonic arrays of length N+1 and M+1, respectively, specifying rectangle boundaries. If not given, will default

(self, ax,
                 x=None,
                 y=None,
                 A=None,
                 *,
                 cmap=None,
                 norm=None,
                 colorizer=None,
                 **kwargs
                 )

Source from the content-addressed store, hash-verified

1213 """
1214
1215 def __init__(self, ax,
1216 x=None,
1217 y=None,
1218 A=None,
1219 *,
1220 cmap=None,
1221 norm=None,
1222 colorizer=None,
1223 **kwargs
1224 ):
1225 """
1226 Parameters
1227 ----------
1228 ax : `~matplotlib.axes.Axes`
1229 The Axes the image will belong to.
1230 x, y : 1D array-like, optional
1231 Monotonic arrays of length N+1 and M+1, respectively, specifying
1232 rectangle boundaries. If not given, will default to
1233 ``range(N + 1)`` and ``range(M + 1)``, respectively.
1234 A : array-like
1235 The data to be color-coded. The interpretation depends on the
1236 shape:
1237
1238 - (M, N) `~numpy.ndarray` or masked array: values to be colormapped
1239 - (M, N, 3): RGB array
1240 - (M, N, 4): RGBA array
1241
1242 cmap : str or `~matplotlib.colors.Colormap`, default: :rc:`image.cmap`
1243 The Colormap instance or registered colormap name used to map
1244 scalar data to colors.
1245 norm : str or `~matplotlib.colors.Normalize`
1246 Maps luminance to 0-1.
1247 **kwargs : `~matplotlib.artist.Artist` properties
1248 """
1249 super().__init__(ax, norm=norm, cmap=cmap, colorizer=colorizer)
1250 self._internal_update(kwargs)
1251 if A is not None:
1252 self.set_data(x, y, A)
1253
1254 def make_image(self, renderer, magnification=1.0, unsampled=False):
1255 # docstring inherited

Callers

nothing calls this directly

Calls 3

set_dataMethod · 0.95
_internal_updateMethod · 0.80
__init__Method · 0.45

Tested by

no test coverage detected