GradientLegend

class pyqtgraph.GradientLegend(size, offset)[source]

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

__init__(size, offset)[source]
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, QPainter, QStyleOptionGraphicsItem, widget: QWidget = None)[source]
setLabels(l)[source]

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