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

Skip to content

Commit 6c1f14f

Browse files
author
Dmitry Lupyan
committed
TypeError occurs when self.button=None in MouseEvents
1 parent 04b8314 commit 6c1f14f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/backend_bases.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1448,7 +1448,7 @@ def __init__(self, name, canvas, x, y, button=None, key=None,
14481448
self.dblclick = dblclick
14491449

14501450
def __str__(self):
1451-
return ("MPL MouseEvent: xy=(%d,%d) xydata=(%s,%s) button=%d " +
1451+
return ("MPL MouseEvent: xy=(%d,%d) xydata=(%s,%s) button=%s " +
14521452
"dblclick=%s inaxes=%s") % (self.x, self.y, self.xdata,
14531453
self.ydata, self.button,
14541454
self.dblclick, self.inaxes)

0 commit comments

Comments
 (0)