I'm trying to write a pyqt4 application including pylab plotting
Up to now, it looks like this (see in attachment).
The picker works fine (I get the msg) *but* I also would like to get
the (x,y) coordinates and the the corresponding value A[x,y].
Could someone tell me what I should do in on_pick with this "event"
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: " + str(mouseevent.ydata)
QMessageBox.information(self, "Click!", msg)
I got some good tips on how to do this from examples/event_handling/pick_event_demo.py
Christopher Brown, Ph.D.
Department of Speech and Hearing Science
Arizona State University