ScaleBar

class pyqtgraph.ScaleBar(size, width=5, brush=None, pen=None, suffix='m', offset=None)[source]

Displays a rectangular bar to indicate the relative scale of objects on the view.

__init__(size, width=5, brush=None, pen=None, suffix='m', offset=None)[source]

x.__init__(…) initializes x; see help(type(x)) for signature

boundingRect(self) → QRectF[source]
parentChanged()[source]

Called when the item’s parent has changed. This method handles connecting / disconnecting from ViewBox signals to make sure viewRangeChanged works properly. It should generally be extended, not overridden.

setParentItem(self, QGraphicsItem)[source]