From: Haibao T. <ba...@ug...> - 2004-12-26 04:36:40
|
Hi, in some analysis, I really think it useful if you can add a crosshair feature so I can visually align the position of peaks and falls (like the stock market), and may be not hard to include, too. Basically, if the "crosshair" checkbox checked, a horizontal and a vertical line will appear with the movement of the mouse. Bao |
From: John H. <jdh...@ac...> - 2004-12-27 19:07:00
|
>>>>> "Haibao" == Haibao Tang <ba...@ug...> writes: Haibao> Hi, in some analysis, I really think it useful if you can Haibao> add a crosshair feature so I can visually align the Haibao> position of peaks and falls (like the stock market), and Haibao> may be not hard to include, too. Basically, if the Haibao> "crosshair" checkbox checked, a horizontal and a vertical Haibao> line will appear with the movement of the mouse. It would be nice to have this feature efficiently across backends. There is an example which shows you how to do this for an arbitrary backend http://matplotlib.sf.net/examples/cursor_demo.py but it can be slow because it redraws the entire figure every time you move the cursor. This is a general problem with animations in matplotlib that we are thinking about - see for example http://sourceforge.net/mailarchive/message.php?msg_id=10330431 . There is also an example showing how to do this for WX/WXAgg (if memory serves, you are using wx because it supports chinese characters). This uses WX to do the cursoring, which is much more efficient because you don't have to redraw the figure http://matplotlib.sf.net/examples/wxcursor_demo.py When time permits, it would be nice to add cursoring on each backend with native drawing of the cursor for efficiency... JDH |