LinearRegionItem¶
-
class
pyqtgraph.
LinearRegionItem
(values=[0, 1], orientation=None, brush=None, movable=True, bounds=None)[source]¶ Bases:
UIGraphicsItem
Used for marking a horizontal or vertical region in plots. The region can be dragged and is bounded by lines which can be dragged individually.
Signals: sigRegionChangeFinished(self) Emitted when the user has finished dragging the region (or one of its lines) and when the region is changed programatically. sigRegionChanged(self) Emitted while the user is dragging the region (or one of its lines) and when the region is changed programatically. -
__init__
(values=[0, 1], orientation=None, brush=None, movable=True, bounds=None)[source]¶ Create a new LinearRegionItem.
Arguments: values A list of the positions of the lines in the region. These are not limits; limits can be set by specifying bounds. orientation Options are LinearRegionItem.Vertical or LinearRegionItem.Horizontal. If not specified it will be vertical. brush Defines the brush that fills the region. Can be any arguments that are valid for mkBrush
. Default is transparent blue.movable If True, the region and individual lines are movable by the user; if False, they are static. bounds Optional [min, max] bounding values for the region
-
dataBounds
(axis, frac=1.0, orthoRange=None)[source]¶ Called by ViewBox for determining the auto-range bounds. By default, UIGraphicsItems are excluded from autoRange.
-
setBounds
(bounds)[source]¶ Optional [min, max] bounding values for the region. To have no bounds on the region use [None, None]. Does not affect the current position of the region unless it is outside the new bounds. See
setRegion
to set the position of the region.
-
setBrush
(*br, **kargs)[source]¶ Set the brush that fills the region. Can have any arguments that are valid for
mkBrush
.
-