class_docstr: Draw a colorbar in an existing axes.
  
  This is a base class for the :class:`Colorbar` class, which is the
  basis for the :func:`~matplotlib.pyplot.colorbar` method and pylab
  function.
  
  It is also useful by itself for showing a colormap.  If the *cmap*
  kwarg is given but *boundaries* and *values* are left as None,
  then the colormap will be displayed on a 0-1 scale. To show the
  under- and over-value colors, specify the *norm* as::
  
      colors.Normalize(clip=False)
  
  To show the colors versus index instead of on the 0-1 scale,
  use::
  
      norm=colors.NoNorm.
  
  Useful attributes:
  
      :attr:`ax`
          the Axes instance in which the colorbar is drawn
  
      :attr:`lines`
          a LineCollection if lines were drawn, otherwise None
  
      :attr:`dividers`
          a LineCollection if *drawedges* is True, otherwise None
  
  Useful public methods are :meth:`set_label` and :meth:`add_lines`.
class_docstr_tok: ["Draw","a","colorbar","in","an","existing","axes",".","This","is","a","base","class","for","the",":","class",":","`","Colorbar","`","class",",","which","is","the","basis","for","the",":","func",":","`","~matplotlib.pyplot.colorbar","`","method","and","pylab","function",".","It","is","also","useful","by","itself","for","showing","a","colormap",".","If","the","*","cmap","*","kwarg","is","given","but","*","boundaries","*","and","*","values","*","are","left","as","None",",","then","the","colormap","will","be","displayed","on","a","0-1","scale",".","To","show","the","under-","and","over-value","colors",",","specify","the","*","norm","*","as",":",":","colors.Normalize","(","clip=False",")","To","show","the","colors","versus","index","instead","of","on","the","0-1","scale",",","use",":",":","norm=colors.NoNorm",".","Useful","attributes",":",":","attr",":","`","ax","`","the","Axes","instance","in","which","the","colorbar","is","drawn",":","attr",":","`","lines","`","a","LineCollection","if","lines","were","drawn",",","otherwise","None",":","attr",":","`","dividers","`","a","LineCollection","if","*","drawedges","*","is","True",",","otherwise","None","Useful","public","methods","are",":","meth",":","`","set_label","`","and",":","meth",":","`","add_lines","`","."]
docstr: Draw the colors using :meth:`~matplotlib.axes.Axes.pcolormesh`;
  optionally add separators.
docstr_tok: ["Draw","the","colors","using",":","meth",":","`","~matplotlib.axes.Axes.pcolormesh","`",";","optionally","add","separators","."]
code: def _add_solids(self, X, Y, C):
      """
      Draw the colors using :meth:`~matplotlib.axes.Axes.pcolormesh`;
      optionally add separators.
      """
      ## Change to pcolorfast after fixing bugs in some backends...
  
      if self.extend in ["min", "both"]:
          cc = self.to_rgba([C[0][0]])
          self.extension_patch1.set_fc(cc[0])
          X, Y, C = X[1:], Y[1:], C[1:]
  
      if self.extend in ["max", "both"]:
          cc = self.to_rgba([C[-1][0]])
          self.extension_patch2.set_fc(cc[0])
          X, Y, C = X[:-1], Y[:-1], C[:-1]
  
      if self.orientation == "vertical":
          args = (X, Y, C)
      else:
          args = (np.transpose(Y), np.transpose(X), np.transpose(C))
      kw = {
          "cmap": self.cmap,
          "norm": self.norm,
          "shading": "flat",
          "alpha": self.alpha,
      }
  
      del self.solids
      del self.dividers
  
      col = self.ax.pcolormesh(*args, **kw)
  
      self.solids = col
      if self.drawedges:
          self.dividers = collections.LineCollection(
              self._edges(X, Y),
              colors=(mpl.rcParams["axes.edgecolor"],),
              linewidths=(0.5 * mpl.rcParams["axes.linewidth"],),
          )
          self.ax.add_collection(self.dividers)
      else:
          self.dividers = None
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import six
  from six.moves import xrange, zip
  import numpy
  import matplotlib
  import matplotlib.colors
  import matplotlib.cm
  from matplotlib import docstring
  import matplotlib.ticker
  import matplotlib.cbook
  import matplotlib.collections
  import matplotlib.contour
  from matplotlib.path import Path
  from matplotlib.patches import PathPatch
  from matplotlib.transforms import Bbox
label_desc: Use image node_id 9 for calling the ColorbarBase obj's underlying member method code with example usage: obj._add_solids(X, Y, C) without return types