From: John H. <jdh...@ac...> - 2004-12-09 16:45:26
|
>>>>> "Eric" == Eric Emsellem <ems...@ob...> writes: Eric> P.S.: by the way I solved the cursor problem I posted (and Eric> got no answer) by defining a new cursor class (something Eric> already hinted by many on the web), if anyone is Eric> interested.. Been out of town at meetings for the last week... Have you seen http://matplotlib.sourceforge.net/examples/coords_demo.py, which shows how to connect to mouse motion and click? The interface is being streamlined in 0.65. Ie in CVS, one simply needs to do def on_click(event): pass connect('button_press_event', on_click) Currently key_press_event is not implemented (though mouse move and motion to capture and report key presses as event.key). We added this because this is how we do the event handling across backends for the toolbar. There are also some fixes in CVS to make disconnects work properly, eg in the tk backend. It would be fairly straightforward to add a key_press_event under the same framework. For "cursoring", see the *cursor*.py examples in the examples subdir of the matplotlib src distro. But please also post your solution which may be useful.... JDH |