GradientLegend — pyqtgraph 0.11.0rc0 documentation

# GradientLegend

class `pyqtgraph.` `GradientLegend`(size, offset)

  Draws a color gradient rectangle along with text labels denoting the value at specific points along the gradient.

  `__init__`(size, offset)

    Arguments: |
    bounds | QRectF with coordinates relative to view box. The default is QRectF(0,0,1,1), which means the item will have the same bounds as the view.

  `paint`(self, painter: PySide2.QtGui.QPainter, option: PySide2.QtWidgets.QStyleOptionGraphicsItem, widget: typing.Union[PySide2.QtWidgets.QWidget, NoneType] = None)
  `setLabels`(l)

    Defines labels to appear next to the color scale. Accepts a dict of {text: value} pairs