class_docstr: Draws a color gradient rectangle along with text labels denoting the value at specific
  points along the gradient.
class_docstr_tok: ["Draws","a","color","gradient","rectangle","along","with","text","labels","denoting","the","value","at","specific","points","along","the","gradient","."]
code: def setGradient(self, g):
      self.gradient = g
      self.update()
  
file_path: pyqtgraph/pyqtgraph/graphicsItems/GradientLegend.py
imports: from ..None import functions
  from ..Qt import QtCore, QtGui
  from .UIGraphicsItem import UIGraphicsItem
label_desc: Use image node_id 2 for calling the GradientLegend obj's underlying member method code with example usage: obj.setGradient(g) without return types