XG> I'm trying to write a pyqt4 application including pylab plotting
XG> Up to now, it looks like this (see in attachment).
XG> The picker works fine (I get the msg) *but* I also would like to get
XG> the (x,y) coordinates and the the corresponding value A[x,y].
XG> Could someone tell me what I should do in on_pick with this "event"
XG> to get these data??
This works for me:
def on_pick(self, event):
tt = event.artist.get_axes()
mouseevent = event.mouseevent
msg = "X is: " + str(mouseevent.xdata) + "\nY is: " +
QMessageBox.information(self, "Click!", msg)
I got some good tips on how to do this from
Christopher Brown, Ph.D.
Department of Speech and Hearing Science
Arizona State University