[Tkinter-discuss] tkinter and cursor

守株待兔 1248283536 at qq.com
Fri Sep 2 05:59:13 CEST 2011


from matplotlib.widgets import Cursor import numpy as np import matplotlib.pyplot as plt fig = plt.figure(figsize=(8, 6)) ax = fig.add_subplot(111, axisbg='#FFFFCC') x, y = 4*(np.random.rand(2, 100)-.5) ax.plot(x, y, 'o') ax.set_xlim(-2, 2) ax.set_ylim(-2, 2) # set useblit = True on gtkagg for enhanced performance cursor = Cursor(ax, useblit=True, color='red', linewidth=2 ) plt.show()

you can get a  figure  with the program, when you move mouse on the canvas (figure),you can see the coordinate on the  right corner , i want to make it in tkinter,there is no "move click in the canvas" event in tkinter,how to make it in tkinter??
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tkinter-discuss/attachments/20110902/568174c4/attachment.html>


More information about the Tkinter-discuss mailing list