InfiniteLine

class pyqtgraph.InfiniteLine(pos=None, angle=90, pen=None, movable=False, bounds=None)

Displays a line of infinite length. This line may be dragged to indicate a position in data coordinates.

__init__(pos=None, angle=90, pen=None, movable=False, bounds=None)
Initialization options:
pos - Position of the line. This can be a QPointF or a single value for vertical/horizontal lines. angle - Angle of line in degrees. 0 is horizontal, 90 is vertical. pen - Pen to use when drawing line movable - If True, the line can be dragged to a new position by the user bounds - Optional [min, max] bounding values. Bounds are only valid if the line is vertical or horizontal.
setAngle(angle)

Takes angle argument in degrees. 0 is horizontal; 90 is vertical.

Note that the use of value() and setValue() changes if the line is not vertical or horizontal.

setBounds(bounds)

Set the (minimum, maximum) allowable values when dragging.

Previous topic

LinearRegionItem

Next topic

ROI

This Page