ScaleBar — pyqtgraph 0.11.0rc0 documentation

# ScaleBar

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

  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)

    Initialize self. See help(type(self)) for accurate signature.

  `boundingRect`(self) → PySide2.QtCore.QRectF
  `parentChanged`()

    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, parent: PySide2.QtWidgets.QGraphicsItem)