code: def colorbar(height, length, colormap):
      
      cbar = np.tile(np.arange(length) * 1.0 / (length - 1), (height, 1))
      cbar = (cbar * (colormap.values.max() - colormap.values.min())
              + colormap.values.min())
  
      return colormap.colorize(cbar)
docs: Return the channels of a colorbar.