Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d8b21f2

Browse files
committed
Properly passing on horiz-/vertOn to Cursor()
Simple fix to properly pass on the horizOn and vertOn keyword arguments to the matplotlib.widgets.Cursor constructor.
1 parent 3c73aac commit d8b21f2

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/matplotlib/widgets.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,7 @@ class Cursor(AxesWidget):
801801
802802
and the visibility of the cursor itself with the *visible* attribute
803803
"""
804-
def __init__(self, ax, useblit=False, **lineprops):
804+
def __init__(self, ax, horizOn=True, vertOn=True, useblit=False, **lineprops):
805805
"""
806806
Add a cursor to *ax*. If ``useblit=True``, use the backend-
807807
dependent blitting features for faster updates (GTKAgg
@@ -816,8 +816,8 @@ def __init__(self, ax, useblit=False, **lineprops):
816816
self.connect_event('draw_event', self.clear)
817817

818818
self.visible = True
819-
self.horizOn = True
820-
self.vertOn = True
819+
self.horizOn = horizOn
820+
self.vertOn = vertOn
821821
self.useblit = useblit
822822

823823
if useblit:

0 commit comments

Comments
 (0)