Thanks for your reply, but:

>See the embedding_in_wx examples at
>http://matplotlib.sourceforge.net/examples/user_interfaces/index.html.

The problem with those examples is, when I comment the following line (for 
example in 
http://matplotlib.sourceforge.net/examples/user_interfaces/embedding_in_wx2.html):

        self.add_toolbar() # comment this out for no toolbar

then I have no possibility to make the window react to mouse events.

>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....

I see how the states are handled in NavigationToolbar2. But this would require 
that I rewrite the complete event handler. Or how do I tell the 
NavigationToolbar2 "You are now in pan state. Wait for the next mouse button 
press and then start panning the window."?

Thank you
Peter




________________________________
Von: John Hunter <jdh2...@gmail.com>
An: Peter McGregor <petermcgrego...@yahoo.com>
CC: matplotlib-users@lists.sourceforge.net
Gesendet: Dienstag, den 17. November 2009, 22:25:42 Uhr
Betreff: Re: [Matplotlib-users] 'remote control' matplotlib window

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

Reply via email to