On Tue, Nov 17, 2009 at 1:51 PM, Peter McGregor <petermcgrego...@yahoo.com> wrote: > I have a question, how to control matplotlib from another application. > > Let me explain. We want to monitor some sensor data. The monitoring > application already offers a toolbar to choose the view for several embedded > windows. For example, buttons like "Reset view","Back/Forward", "Pan", > "Zoom" and many more are available. The same functions that are shown in > each TkAgg matplotlib window (like the six buttons in the bottom of > http://postneo.com/pix/matplotlib.png, for example). > > Because we don't want to duplicate the buttons, we want to > * Hide the buttons in the matplotlib window > * Show only the plot without any decorations > * Embed the matplotlib window into out wxPython application (this step is > nice-to-have, but we can also work with another toplevel window, which is > not embedded) > * Finally, but most important: control from our wxPython application when to > set the matplotlib window into Zoom/Pan/Rotate mode > > How can we implement the last step? Do we have to implement our own Backend? > What we need is documented for Chaco in detail, but has it been done with > matplotlib before? We prefer matplotlib because it is more advanced except > for the UI integration.
See the embedding_in_wx examples at http://matplotlib.sourceforge.net/examples/user_interfaces/index.html. Take a look at the source code in matplotlib/backend_bases.py at the NavigationToolbar2 implementation to see how we manage the pan/zoom state, etc.... JDH ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users