|
From: Tony Yu <ts...@gm...> - 2012-01-02 15:21:41
|
On Mon, Jan 2, 2012 at 6:01 AM, Virgil Stokes <vs...@it...> wrote: > The following link should link you to a very interesting graphical display, > > > http://www.ecb.int/stats/exchange/eurofxref/html/eurofxref-graph-nok.en.html > > This type of graphical output (or at least something quite similar) can be > found > in other web pages that display financial data. > > Has anyone been able to produce a similar interactive graphical display > using > Matplotlib? A challenge for 2012 :-) > > --V > This shouldn't be too difficult. If you take a look at the event handling examples<http://matplotlib.sourceforge.net/examples/event_handling/index.html>there are some good starting points. For example, the data browser example<http://matplotlib.sourceforge.net/examples/event_handling/data_browser.html>does something similar, except you click to select data (you can change this by hooking into 'motion_notify_event' instead of 'pick_event'). The one difficult part might be displaying your data-point info. Its easy enough to just print out description to a terminal, but I'm not sure how easy it is to display a tooltip. This SO question<http://stackoverflow.com/questions/7908636/possible-to-make-labels-appear-when-hovering-over-a-point-in-matplotlib>may help with that. Best, -Tony |