'Create an InfiniteLine and add to the plot.
If *x* is specified,
the line will be vertical. If *y* is specified, the line will be
horizontal. All extra keyword arguments are passed to
:func:`InfiniteLine.__init__() <pyqtgraph.InfiniteLine.__init__>`.
Returns the item created.'

def addLine(self, x=None, y=None, z=None, **kwds):

    pos = kwds.get('pos', (x if (x is not None) else y))
    angle = kwds.get('angle', (0 if (x is None) else 90))
    line = InfiniteLine(pos, angle, **kwds)
    self.addItem(line)
    if (z is not None):
        line.setZValue(z)
    return line
