class_docstr: Displays legend colorbar on the screen.
docstr: Arguments:
      pos: position of the colorbar on the screen, from the top left corner, in pixels
      size: size of the colorbar without the text, in pixels
      gradient: a pg.ColorMap used to color the colorbar
      labels: a dict of "text":value to display next to the colorbar.
          The value corresponds to a position in the gradient from 0 to 1.
      fontColor: sets the color of the texts. Accepts any single argument accepted by
          :func:`~pyqtgraph.mkColor`
      #Todo:
          size as percentage
          legend title
code: def __init__(self, parentItem=None, **kwds):
      """
      Arguments:
          pos: position of the colorbar on the screen, from the top left corner, in pixels
          size: size of the colorbar without the text, in pixels
          gradient: a pg.ColorMap used to color the colorbar
          labels: a dict of "text":value to display next to the colorbar.
              The value corresponds to a position in the gradient from 0 to 1.
          fontColor: sets the color of the texts. Accepts any single argument accepted by
              :func:`~pyqtgraph.mkColor`
          #Todo:
              size as percentage
              legend title
      """
      super().__init__(parentItem=parentItem)
      glopts = kwds.pop("glOptions", "additive")
      self.setGLOptions(glopts)
      self.pos = (10, 10)
      self.size = (10, 100)
      self.fontColor = QtGui.QColor(QtCore.Qt.GlobalColor.white)
      # setup a default trivial gradient
      stops = (0.0, 1.0)
      self.gradient = ColorMap(pos=stops, color=(0.0, 1.0))
      self._gradient = None
      self.labels = {str(x): x for x in stops}
      self.setData(**kwds)
  
file_path: pyqtgraph/pyqtgraph/opengl/items/GLGradientLegendItem.py
imports: from ...None import functions
  from ...colormap import ColorMap
  from ...Qt import QtCore, QtGui
  from ..GLGraphicsItem import GLGraphicsItem
label_desc: Use image node_id 1 to create a new GLGradientLegendItem object from inherited base classes: GLGraphicsItem with example: obj = GLGradientLegendItem(parentItem)