Christopher Brown wrote: > Hi Xavier, > > XG> I'm trying to write a pyqt4 application including pylab plotting > XG> capabilities. > XG> Up to now, it looks like this (see in attachment). > XG> > 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?? > XG> > XG> Xavier > > 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 > Thanks!! It works just fine :). IDL is dead. Qt4 python and numpy/scipy/numpy are great tools.
Xavier ------------------------------------------------------------------------------ Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users