class_docstr: Visual subclass displaying a colorbar
  
  Parameters
  ----------
  cmap : str | vispy.color.ColorMap
      Either the name of the ColorMap to be used from the standard
      set of names (refer to `vispy.color.get_colormap`),
      or a custom ColorMap object.
      The ColorMap is used to apply a gradient on the colorbar.
  orientation : {'left', 'right', 'top', 'bottom'}
      The orientation of the colorbar, used for rendering. The
      orientation can be thought of as the position of the label
      relative to the color bar.
  
      When the orientation is 'left' or 'right', the colorbar is
      vertically placed. When it is 'top' or 'bottom', the colorbar is
      horizontally placed.
  
          * 'top': the colorbar is horizontal.
            Color is applied from left to right.
            Minimum corresponds to left and maximum to right.
            Label is to the top of the colorbar
  
          * 'bottom': Same as top, except that
            label is to the bottom of the colorbar
  
          * 'left': the colorbar is vertical.
            Color is applied from bottom to top.
            Minimum corresponds to bottom and maximum to top.
            Label is to the left of the colorbar
  
          * 'right': Same as left, except that the
            label is placed to the right of the colorbar
  
  size : (major_axis_length, minor_axis_length)
      lengths with respect to the major and minor axes.
      The minor axis is the shorter axis, while the major axis is
      the longer axis with respect to the orientation
  
      For orientations 'top' and 'bottom', the major axis is
      along the length.
  
      For orientations 'left' and 'right', the major axis is
      along the breadth
  pos : tuple (x, y)
      Position where the colorbar is to be placed with
      respect to the center of the colorbar
  label : str | vispy.visuals.TextVisual
      The label that is to be drawn with the colorbar
      that provides information about the colorbar.
      If a TextVisual object then 'label_color' is ignored.
  label_color : str | vispy.color.Color
      The color of the label and tick labels. This can either be a
      str as the color's name or an actual instace of a vipy.color.Color
  clim : tuple (min, max)
      the minimum and maximum values of the data that
      is given to the colorbar. This is used to draw the scale
      on the side of the colorbar.
  border_width : float (in px)
      The width of the border the colormap should have. This measurement
      is given in pixels
  border_color : str | vispy.color.Color
      The color of the border of the colormap. This can either be a
      str as the color's name or an actual instace of a vipy.color.Color
  
  .. versionchanged:: 0.7
  
      Keyword argument ``label_str`` renamed to `label`.
class_docstr_tok: ["Visual","subclass","displaying","a","colorbar","Parameters","--","--","--","--","--","cmap",":","str","|","vispy.color.ColorMap","Either","the","name","of","the","ColorMap","to","be","used","from","the","standard","set","of","names","(","refer","to","`","vispy.color.get_colormap","`",")",",","or","a","custom","ColorMap","object",".","The","ColorMap","is","used","to","apply","a","gradient","on","the","colorbar",".","orientation",":","{","'left","'",",","'right","'",",","'top","'",",","'bottom","'","}","The","orientation","of","the","colorbar",",","used","for","rendering",".","The","orientation","can","be","thought","of","as","the","position","of","the","label","relative","to","the","color","bar",".","When","the","orientation","is","'left","'","or","'right","'",",","the","colorbar","is","vertically","placed",".","When","it","is","'top","'","or","'bottom","'",",","the","colorbar","is","horizontally","placed",".","*","'top","'",":","the","colorbar","is","horizontal",".","Color","is","applied","from","left","to","right",".","Minimum","corresponds","to","left","and","maximum","to","right",".","Label","is","to","the","top","of","the","colorbar","*","'bottom","'",":","Same","as","top",",","except","that","label","is","to","the","bottom","of","the","colorbar","*","'left","'",":","the","colorbar","is","vertical",".","Color","is","applied","from","bottom","to","top",".","Minimum","corresponds","to","bottom","and","maximum","to","top",".","Label","is","to","the","left","of","the","colorbar","*","'right","'",":","Same","as","left",",","except","that","the","label","is","placed","to","the","right","of","the","colorbar","size",":","(","major_axis_length",",","minor_axis_length",")","lengths","with","respect","to","the","major","and","minor","axes",".","The","minor","axis","is","the","shorter","axis",",","while","the","major","axis","is","the","longer","axis","with","respect","to","the","orientation","For","orientations","'top","'","and","'bottom","'",",","the","major","axis","is","along","the","length",".","For","orientations","'left","'","and","'right","'",",","the","major","axis","is","along","the","breadth","pos",":","tuple","(","x",",","y",")","Position","where","the","colorbar","is","to","be","placed","with","respect","to","the","center","of","the","colorbar","label",":","str","|","vispy.visuals.TextVisual","The","label","that","is","to","be","drawn","with","the","colorbar","that","provides","information","about","the","colorbar",".","If","a","TextVisual","object","then","'label_color","'","is","ignored",".","label_color",":","str","|","vispy.color.Color","The","color","of","the","label","and","tick","labels",".","This","can","either","be","a","str","as","the","color","'s","name","or","an","actual","instace","of","a","vipy.color.Color","clim",":","tuple","(","min",",","max",")","the","minimum","and","maximum","values","of","the","data","that","is","given","to","the","colorbar",".","This","is","used","to","draw","the","scale","on","the","side","of","the","colorbar",".","border_width",":","float","(","in","px",")","The","width","of","the","border","the","colormap","should","have",".","This","measurement","is","given","in","pixels","border_color",":","str","|","vispy.color.Color","The","color","of","the","border","of","the","colormap",".","This","can","either","be","a","str","as","the","color","'s","name","or","an","actual","instace","of","a","vipy.color.Color","..","versionchanged",":",":","0.7","Keyword","argument","``","label_str","``","renamed","to","`","label","`","."]
code: def label(self, label):
      if isinstance(label, TextVisual):
          self._label = label
      else:
          self._label.text = label
      self._update()
  
imports: from functools import lru_cache
  import numpy
  from .None import Visual, TextVisual, CompoundVisual, _BorderVisual
  from .shaders import Function
  from ..color import get_colormap
label_desc: Use image node_id 14 for calling the ColorBarVisual obj's underlying member method code with example usage: obj.label(label) without return types