class_docstr: Displays legend colorbar on the screen.
code: def setData(self, **kwds):
      args = ["size", "pos", "gradient", "labels", "fontColor"]
      for k in kwds.keys():
          if k not in args:
              raise Exception(
                  "Invalid keyword argument: %s (allowed arguments are %s)"
                  % (k, str(args))
              )
  
      self.antialias = False
  
      for key in kwds:
          value = kwds[key]
          if key == "fontColor":
              value = fn.mkColor(value)
          elif key == "gradient":
              self._gradient = None
          setattr(self, key, value)
  
      ##todo: add title
      ##todo: take more gradient types
      self.update()
  
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 2 for calling the GLGradientLegendItem obj's underlying member method code with example usage: obj.setData() without return types