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

Skip to content

Commit 735ffe2

Browse files
committed
let widgets.Cursor initialize to the lower x and y bounds
rather than 0,0, which can cause havoc for dates and other transforms svn path=/trunk/matplotlib/; revision=4658
1 parent c1134bd commit 735ffe2

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

CHANGELOG

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2007-12-06 let widgets.Cursor initialize to the lower x and y bounds
2+
rather than 0,0, which can cause havoc for dates and other
3+
transforms - DSD
4+
15
2007-12-06 updated references to mpl data directories for py2exe - DSD
26

37
2007-12-06 fixed a bug in rcsetup, see bug 1845057 - DSD

lib/matplotlib/widgets.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -662,8 +662,8 @@ def __init__(self, ax, useblit=False, **lineprops):
662662
self.vertOn = True
663663
self.useblit = useblit
664664

665-
self.lineh = ax.axhline(0, visible=False, **lineprops)
666-
self.linev = ax.axvline(0, visible=False, **lineprops)
665+
self.lineh = ax.axhline(ax.get_ybound()[0], visible=False, **lineprops)
666+
self.linev = ax.axvline(ax.get_xbound()[0], visible=False, **lineprops)
667667

668668
self.background = None
669669
self.needclear = False
@@ -1070,11 +1070,11 @@ def ignore(self, event):
10701070
# If RectangleSelector is not active :
10711071
if not self.active:
10721072
return True
1073-
1073+
10741074
# If canvas was locked
10751075
if not self.canvas.widgetlock.available(self):
10761076
return True
1077-
1077+
10781078
# If no button was pressed yet ignore the event if it was out
10791079
# of the axes
10801080
if self.eventpress == None:
@@ -1174,7 +1174,7 @@ def set_active(self, active):
11741174

11751175
def get_active(self):
11761176
""" to get status of active mode (boolean variable)"""
1177-
return self.active
1177+
return self.active
11781178

11791179
class Lasso(Widget):
11801180
def __init__(self, ax, xy, callback=None, useblit=True):

0 commit comments

Comments
 (0)