class_docstr: A mixin class to map scalar data to RGBA.
  
  The ScalarMappable applies data normalization before returning RGBA colors
  from the given colormap.
docstr: 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
      on the scale with the corresponding name.
      If *None*, *norm* defaults to a *colors.Normalize* object which
      initializes its scaling based on the first data processed.
  cmap : str or `~matplotlib.colors.Colormap`
      The colormap used to map normalized data values to RGBA colors.
docstr_tok: ["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","on","the","scale","with","the","corresponding","name",".","If","*","None","*",",","*","norm","*","defaults","to","a","*","colors.Normalize","*","object","which","initializes","its","scaling","based","on","the","first","data","processed",".","cmap",":","str","or","`","~matplotlib.colors.Colormap","`","The","colormap","used","to","map","normalized","data","values","to","RGBA","colors","."]
code: def __init__(self, norm=None, cmap=None):
      """
      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
          on the scale with the corresponding name.
          If *None*, *norm* defaults to a *colors.Normalize* object which
          initializes its scaling based on the first data processed.
      cmap : str or `~matplotlib.colors.Colormap`
          The colormap used to map normalized data values to RGBA colors.
      """
      self._A = None
      self._norm = None  # So that the setter knows we're initializing.
      self.set_norm(
          norm
      )  # The Normalize instance of this ScalarMappable.
      self.cmap = None  # So that the setter knows we're initializing.
      self.set_cmap(
          cmap
      )  # The Colormap instance of this ScalarMappable.
      #: The last colorbar associated with this ScalarMappable. May be None.
      self.colorbar = None
      self.callbacks = cbook.CallbackRegistry(signals=["changed"])
  
imports: from collections.abc import Mapping
  import functools
  import numpy
  from numpy import ma
  import matplotlib
  from matplotlib import _api, colors, cbook, scale
  from matplotlib._cm import datad
  from matplotlib._cm_listed import cmaps
label_desc: Use image node_id 1 to create a new ScalarMappable object  with example: obj = ScalarMappable(norm, cmap)