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: Set displayed gradient from a :class:`~pyqtgraph.ColorMap` object.
docstr_tok: ["Set","displayed","gradient","from","a",":","class",":","`","~pyqtgraph.ColorMap","`","object","."]
code: def setColorMap(self, colormap):
      """
      Set displayed gradient from a :class:`~pyqtgraph.ColorMap` object.
      """
      self.gradient = colormap.getGradient()
  
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 3 for calling the GradientLegend obj's underlying member method code with example usage: obj.setColorMap(colormap) without return types