InfiniteLine — pyqtgraph 0.9.8 documentation

### Navigation

- index
- modules |
- next |
- previous |
- pyqtgraph 0.9.8 documentation »
- API Reference »
- Pyqtgraph’s Graphics Items »

# InfiniteLine

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

  Bases: `GraphicsObject`

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

  Signals |
  sigDragged(self) |
  sigPositionChangeFinished(self) |
  sigPositionChanged(self) |

  `__init__`(pos=None, angle=90, pen=None, movable=False, bounds=None)

    Arguments |
    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. Can be any arguments that are valid for `mkPen`. Default pen is transparent yellow.
    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.

  `setMovable`(m)

    Set whether the line is movable by the user.

  `setPen`(pen)

    Set the pen for drawing the line. Allowable arguments are any that are valid for `mkPen`.

  `setValue`(v)

    Set the position of the line. If line is horizontal or vertical, v can be a single value. Otherwise, a 2D coordinate must be specified (list, tuple and QPointF are all acceptable).

  `value`()

    Return the value of the line. Will be a single number for horizontal and vertical lines, and a list of [x,y] values for diagonal lines.

### Navigation

- index
- modules |
- next |
- previous |
- pyqtgraph 0.9.8 documentation »
- API Reference »
- Pyqtgraph’s Graphics Items »