[SciPy-user] plotting from within a wxPython app

Paul Casteels Paul.Casteels at ua.ac.be
Tue Oct 25 11:52:37 CDT 2005

Grant Edwards schreef:
> On 2005-10-25, mike cantor <mcantor at stanford.edu> wrote:
>>	I am writing a GUI using wxPython to manipulate and run an ODE-based 
>>model.  What is the best way to embed a plot in the application?
> This is just one guy's opinion, but I think the best way to
> embed a plot into an application is not to.  After working on
> several wxPython based programs that do plotting, I've decied
> that I really prefer using Gnuplot to generate a separate plot
> window.  I have the controls/data in the wxPython application's
> window and the plot in a second window.  I find this to be much
> more flexible, and you gain all of the interactivity of Gnpulot
> windows.  For example, using the mouse the user can rotate/zoom
> surface plots with the mouse, the user can find the cordinates
> of points on an X-Y plot.
> The user can hide the plot window while working on the data or
> settings.  Once the plot does what the user wants, they can
> show/maximize the plot window and not have any screen space
> wasted by widgets.
I once used DISLIN ( http://www.mps.mpg.de/dislin/, a very nice plotting library and free 
for Python users ) in a wxPython application and experienced similar problems.
Putting the plotting code in a separate thread did the trick.
wxPython seems quite picky with 'foreign' libraries : with a NI USB data acquisition 
library I had similar problems and solved them in the same way.

More information about the SciPy-user mailing list