Graph in wxPython

O

Oh Kyu Yoon

Does anyone know how to implement plots from scipy, chaco, etc
into wxPython widget?

Thank you
 
M

Miki Tebeka

Hello "Oh Kyu Yoon",
Does anyone know how to implement plots from scipy, chaco, etc
into wxPython widget?
Save them as an image and use wxImage?

HTH.
Miki
 
D

Derrick 'dman' Hudson

Hello "Oh Kyu Yoon",


Save them as an image and use wxImage?

This works. This past spring I had to implement basic graph
generation for a school project I was using wxPython for. I opened a
pipe to gnuplot, let it create an image, then displayed the image.

-D
 
J

John Hunter

Oh> Does anyone know how to implement plots from scipy, chaco, etc
Oh> into wxPython widget?

matplotlib has a wxpython plotting backend, which supports interactive
data exploration and hardcopy save to a variety of output formats --
http://matplotlib.sourceforge.net

Here's a sample script:

import matplotlib
matplotlib.use('WX')
from matplotlib import plot, show
plot([1,2,3])
show()

You can use matplotlib interactively from the python shell, in batch
python scripts, or embed it in wxpython application window. Or you
can use it offline w/o a GUI environment to make hardcopy plots in
PNG, PS or other formats.

See the example examples/embedding_in_wx.py for demo code showing how
to embed matplotlib figures into wx apps.

matplotlib also supports GTK, PS and GD.

biasedly-yours,
JDH
 
C

Cousin Stanley

John ....

Perhaps I can add another verse to that song I've been writing
called The GTK/PyGtk/wGlade/Wx/MatPlotLib Blues ....

You know a couple of verses already .... :)
unrecognized backend WX.
Use one of PS, GD, GTK, Template
 
J

John Hunter

Cousin> John .... Perhaps I can add another verse to that song
Cousin> I've been writing called The
Cousin> GTK/PyGtk/wGlade/Wx/MatPlotLib Blues ....

Cousin> You know a couple of verses already .... :)
Cousin> unrecognized backend WX. Use one of PS, GD, GTK, Template

Looks like you're using an older version of matplotlib. The WX
backend is a fairly recent addition. Make sure you are using 0.40.

Hope this helps,
JDH
 
C

Cousin Stanley

| Looks like you're using an older version of matplotlib.
|
| The WX backend is a fairly recent addition.
|
| Make sure you are using 0.40

John ....

I've got MatPlotLib 0.30 installed here on 2003-10-21 ....

I'll look for 0.40 ....

Thanks for the update ....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,174
Messages
2,570,940
Members
47,486
Latest member
websterztechnologies01

Latest Threads

Top