[SciPy-user] plotting from within a wxPython app

Christian Kristukat ckkart at hoc.net
Tue Oct 25 03:33:00 CDT 2005


Robert Kern wrote:
> mike cantor wrote:
> 
>>Hi all,
>>
>>I am new to python and SciPy and so far I am having a great time with 
>>it!  Here is my question:
>>
>>	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?  That is, 
>>how do instantiate a plot window within a frame/window which I can still 
>>control from the application.  I guess one possibility would be to save the 
>>plot to a png file and then open the file as an image in a frame but it 
>>seems like there should be a better way.  It would be nice if I could open 
>>a plot window from within the app that retains its interactive properties.
> 
> 
> The plotting capabilities in scipy are deprecated, and I'm not sure that
> they supported embedding in a wxPython GUI in the first place. I
> recommend that you take a look at matplotlib and Chaco, which do support
> embedding in wxPython GUIs and are actively developed. matplotlib might
> be easier to get going with because it has an established community with
> lots of people to answer your questions.
> 
> http://matplotlib.sourceforge.net
> http://code.enthought.com/chaco/chaco.htm
> 

You should consider the wxPython PyPlot module, too. It comes with some nice
demonstration how to use it in an application. It is by far not as powerful as
matplotlib but much faster. I use matplotlib for the final step, i.e. to produce
printable output.

Christian




More information about the SciPy-user mailing list