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","."]
docstr: Defines labels to appear next to the color scale. Accepts a dict of {text: value} pairs
docstr_tok: ["Defines","labels","to","appear","next","to","the","color","scale",".","Accepts","a","dict","of","{","text",":","value","}","pairs"]
code: def setLabels(self, l):
      """Defines labels to appear next to the color scale. Accepts a dict of {text: value} pairs"""
      self.labels = l
      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 5 for calling the GradientLegend obj's underlying member method code with example usage: obj.setLabels(l) without return types