Skip to content

Commit 9310a2b

Browse files
committed
Merge pull request matplotlib#2399 from dimkal/master
TypeError occurs when self.button=None in MouseEvents
2 parents f37df88 + 6c1f14f commit 9310a2b

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)