Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e38f699 commit e474977Copy full SHA for e474977
1 file changed
examples/coords_demo.py
@@ -3,6 +3,7 @@
3
An example of how to interact with the plotting canvas by connecting
4
to move and click events
5
"""
6
+import sys
7
from matplotlib.matlab import *
8
9
t = arange(0.0, 1.0, 0.01)
@@ -27,9 +28,11 @@ def on_click(event):
27
28
if event.inaxes is not None:
29
print 'data coords', event.xdata, event.ydata
30
-canvas.mpl_connect('motion_notify_event', on_move)
31
+binding_id = canvas.mpl_connect('motion_notify_event', on_move)
32
#canvas.mpl_connect('button_press_event', on_click)
33
-
34
+if "test_disconnect" in sys.argv:
35
+ print "disconnecting console coordinate printout..."
36
+ canvas.mpl_disconnect(binding_id)
37
38
show()
0 commit comments