Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c30cbf5

Browse filesBrowse files
committed
fixed location event bug
svn path=/trunk/matplotlib/; revision=860
1 parent 1ae32e6 commit c30cbf5
Copy full SHA for c30cbf5

File tree

Expand file treeCollapse file tree

3 files changed

+41
-2
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+41
-2
lines changed

‎CHANGELOG

Copy file name to clipboardExpand all lines: CHANGELOG
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
New entries should be added at the top
22

3+
2005-01-09 Fixed a backend_bases event bug caused when an event is
4+
triggered when location is None - JDH
5+
36
2005-01-07 Add patch from Stephen Walton to fix bug in pylab.load()
47
when the % character is included in a comment. - ADS
58

‎TODO

Copy file name to clipboardExpand all lines: TODO
+37-1Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,4 +624,40 @@ ZeroDivisionError: SeparableTransformation::eval_scalars yin interval is zero; c
624624

625625
-- tex_rotation svg line bug (clipping??)
626626

627-
-- lag in release events makes key press nav difficult
627+
-- lag in release events makes key press nav difficult
628+
629+
Microsoft(R) Windows DOS
630+
(C)Copyright Microsoft Corp 1990-2001.
631+
632+
C:\DOCUME~1\MARYHU~1>c:\python24
633+
'c:\python24' is not recognized as an internal or external command,
634+
operable program or batch file.
635+
636+
C:\DOCUME~1\MARYHU~1>c:\python24\python
637+
Python 2.4 (#60, Nov 30 2004, 11:49:19) [MSC v.1310 32 bit (Intel)] on win32
638+
Type "help", "copyright", "credits" or "license" for more information.
639+
>>> from pylab import *
640+
>>> plot([1,2,3])
641+
[<matplotlib.lines.Line2D instance at 0x01BC9490>]
642+
>>> show()
643+
Exception in Tkinter callback
644+
Traceback (most recent call last):
645+
File "c:\python24\lib\lib-tk\Tkinter.py", line 1345, in __call__
646+
return self.func(*args)
647+
File "C:\Python24\Lib\site-packages\matplotlib\backends\backend_tkagg.py", lin
648+
e 215, in key_release
649+
FigureCanvasBase.key_release_event(self, key)
650+
File "C:\Python24\Lib\site-packages\matplotlib\backend_bases.py", line 677, in
651+
key_release_event
652+
event = KeyEvent('key_release_event', self, key, self._lastx, self._lasty)
653+
File "C:\Python24\Lib\site-packages\matplotlib\backend_bases.py", line 640, in
654+
__init__
655+
LocationEvent.__init__(self, name, canvas, x, y)
656+
File "C:\Python24\Lib\site-packages\matplotlib\backend_bases.py", line 566, in
657+
__init__
658+
if a.in_axes(self.x, self.y):
659+
File "C:\Python24\Lib\site-packages\matplotlib\axes.py", line 1544, in in_axes
660+
661+
return self.bbox.contains(xwin, ywin)
662+
TypeError: float() argument must be a string or a number
663+
=========================================

‎lib/matplotlib/backend_bases.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backend_bases.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ def __init__(self, name, canvas, x, y):
567567

568568
self.inaxes = None
569569
for a in self.canvas.figure.get_axes():
570-
if a.in_axes(self.x, self.y):
570+
if self.x is not None and self.y is not None and a.in_axes(self.x, self.y):
571571
self.inaxes = a
572572
xdata, ydata = a.transData.inverse_xy_tup((self.x, self.y))
573573
self.xdata = xdata

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.