[SciPy-user] plt.plot and other wxPython stuff
Douglas Eck
doug at idsia.ch
Thu Nov 21 03:43:56 EST 2002
Hello all, this is just a bit of information because I've seen similar
postings in the archives. A couple of general questions at the end.
I'm trying to use plt.plot in a python app which uses other
wxPython stuff. I find that it is very hard to get things to play
nicely. In short, if I don't import gui_thread then things go wrong. For
example I get this error;
>>> plt.axis([0,1,-100,2323])
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.2/site-packages/scipy/plt/interface.py", line
178, in axis
x_ticks = _active.x_axis.ticks
AttributeError: axis_window instance has no attribute 'ticks'
But if I do import gui_thread, I get lots of strange behavior such
as no window at all appearing or sometimes this:
Xlib: unexpected async reply (sequence 0x61)!
Why bother? Because as I see it, plt.plot is the best all-purpose
scientific plotting code around right now for python. Though it can be a
bit slow, it works, it's zoomable and, best of all, it generates decent
postscript.
What I would like to do is strip out the core of plot.plt and use it in
a more general setting. Namely I would like to make a
scipyPlotCanvas() similar to the wxPlotCanvas() [used to build scipy.plt
I believe]. Then I could just drop the canvas into my app. I would be
responsible for threading issues, negating the need for gui_thread.
I make no promises about having time to do this. But if I do get
something working I will post back. Also, pointers are gladly accepted.
E.g. is chaco to the point where I could use it? I'm a research
scientist with one simple need: a good, flexible plotting canvas for my
python front end.
Regards,
Doug Eck
==
Dr. Douglas Eck www.idsia.ch/~doug
More information about the SciPy-User
mailing list