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

Method __init__

lib/matplotlib/colorizer.py:539–559  ·  view source on GitHub ↗

Parameters ---------- norm : `.Normalize` (or subclass thereof) or str or None The normalizing object which scales data, typically into the interval ``[0, 1]``. If a `str`, a `.Normalize` subclass is dynamically generated based

(self, norm=None, cmap=None, *, colorizer=None, **kwargs)

Source from the content-addressed store, hash-verified

537 # ScalarMappable/ColorizingArtist,
538 # otherwise changed() can be moved to ColorizingArtist.
539 def __init__(self, norm=None, cmap=None, *, colorizer=None, **kwargs):
540 """
541 Parameters
542 ----------
543 norm : `.Normalize` (or subclass thereof) or str or None
544 The normalizing object which scales data, typically into the
545 interval ``[0, 1]``.
546 If a `str`, a `.Normalize` subclass is dynamically generated based
547 on the scale with the corresponding name.
548 If *None*, *norm* defaults to a *colors.Normalize* object which
549 initializes its scaling based on the first data processed.
550 cmap : str or `~matplotlib.colors.Colormap`
551 The colormap used to map normalized data values to RGBA colors.
552 """
553 super().__init__(**kwargs)
554 self._A = None
555 self._colorizer = self._get_colorizer(colorizer=colorizer, norm=norm, cmap=cmap)
556
557 self.colorbar = None
558 self._id_colorizer = self._colorizer.callbacks.connect('changed', self.changed)
559 self.callbacks = cbook.CallbackRegistry(signals=["changed"])
560
561 def set_array(self, A):
562 """

Callers

nothing calls this directly

Calls 3

_get_colorizerMethod · 0.95
__init__Method · 0.45
connectMethod · 0.45

Tested by

no test coverage detected