addLine now accepts 'pos' and 'angle' parameters
The issue and this solution are discussed in issue https://github.com/pyqtgraph/pyqtgraph/issues/70.
This commit is contained in:
parent
6632355719
commit
04baa6eef7
@ -545,9 +545,9 @@ class PlotItem(GraphicsWidget):
|
||||
:func:`InfiniteLine.__init__() <pyqtgraph.InfiniteLine.__init__>`.
|
||||
Returns the item created.
|
||||
"""
|
||||
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)
|
||||
kwds['pos'] = kwds.get('pos', x if x is not None else y)
|
||||
kwds['angle'] = kwds.get('angle', 0 if x is None else 90)
|
||||
line = InfiniteLine(**kwds)
|
||||
self.addItem(line)
|
||||
if z is not None:
|
||||
line.setZValue(z)
|
||||
|
Loading…
Reference in New Issue
Block a user