From: <ba...@ph...> - 2003-02-25 13:48:54
|
Hi, I am thinking of converting from pgplot to plplot and I have a question concerning using the mouse in plplot: Namely, in Python I would like to wait for a mouse-click and get its coordinates. With ppgplot and the "/xwin" this works via ch=pgcurs(x, y) # wait for mouse-click x,y=ch[0],ch[1] I could not find a pendant for this in plplot. Digging a bit it turns out that there is a plGetcursor in bindings/python/plmodule.c. However, in plplotcapi.i the corresponding section is commented out (quite at the end of the text ...). This leaves me with several questions: - is it save to uncomment this part and give it a try ? - what is the reason for excluding this routine ? - if it works with an xwin under Linux, would it also work in M$Windows ? Generally I think that the possibility of interactively using the mouse is quite important. There seem to be very few packages available which do this in an easy way. (for example some tools which can do this keep an id for any plotted point, which leads to problems when plotting several 10000 points ...) ((Side remark: More generally I would find it nice to have routine which does not wait for a mouse-click but just returns the corresponding information (button and position) whenever you invoke the routine (of course only if there was a mouse-event). But for the moment the above functionality would be fine ...)) Many thanks, Arnd |