User Tools

Site Tools


code:demo2d

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
code:demo2d [2016/08/09 10:25]
127.0.0.1 external edit
code:demo2d [2016/09/29 14:35] (current)
asa
Line 60: Line 60:
     if event.key == '​q'​ :     if event.key == '​q'​ :
         if len(X) == 0 : return         if len(X) == 0 : return
-        print 'done creating data.  close this window and use the decisionSurface function'​+        print ('done creating data.  close this window and use the decisionSurface function'​)
         pylab.disconnect(binding_id)         pylab.disconnect(binding_id)
     if event.key =='​1'​ or event.key == '​2'​ :     if event.key =='​1'​ or event.key == '​2'​ :
         if event.inaxes is not None:         if event.inaxes is not None:
-            print 'data coords',​ event.xdata,​ event.ydata+            print ('data coords',​ event.xdata,​ event.ydata)
             X.append([event.xdata,​ event.ydata])             X.append([event.xdata,​ event.ydata])
             Y.append(key_to_class[event.key])             Y.append(key_to_class[event.key])
code/demo2d.txt ยท Last modified: 2016/09/29 14:35 by asa