class_docstr: A Colorbar which is created using :class:`~matplotlib.patches.Patch`
  rather than the default :func:`~matplotlib.axes.pcolor`.
  
  It uses a list of Patch instances instead of a
  :class:`~matplotlib.collections.PatchCollection` because the
  latter does not allow the hatch pattern to vary among the
  members of the collection.
class_docstr_tok: ["A","Colorbar","which","is","created","using",":","class",":","`","~matplotlib.patches.Patch","`","rather","than","the","default",":","func",":","`","~matplotlib.axes.pcolor","`",".","It","uses","a","list","of","Patch","instances","instead","of","a",":","class",":","`","~matplotlib.collections.PatchCollection","`","because","the","latter","does","not","allow","the","hatch","pattern","to","vary","among","the","members","of","the","collection","."]
code: def __init__(self, ax, mappable, **kw):
      # we do not want to override the behaviour of solids
      # so add a new attribute which will be a list of the
      # colored patches in the colorbar
      self.solids_patches = []
      Colorbar.__init__(self, ax, mappable, **kw)
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import six
  from six.moves import xrange, zip
  import warnings
  import numpy
  import matplotlib
  import matplotlib.artist
  import matplotlib.cbook
  import matplotlib.collections
  import matplotlib.colors
  import matplotlib.contour
  import matplotlib.cm
  import matplotlib.gridspec
  import matplotlib.patches
  import matplotlib.path
  import matplotlib.ticker
  import matplotlib.transforms
  import matplotlib._layoutbox
  import matplotlib._constrained_layout
  from matplotlib import docstring
label_desc: Use image node_id 1 to create a new ColorbarPatch object from inherited base classes: Colorbar with example: obj = ColorbarPatch(ax, mappable)