I've just downloaded scipy v 0.5.2 and I would like to be able to draw
plots. I've tried:
import scipy.gplt
import scipy.plt
import scipy.xplt
and none of them work. Are these modules still included in scipy ? If
not, where can I find them ?
Thanks for your answers,
Cédric
You really want matplotlib and PyLab the library built on top of it.
Search on the python.org site for examples. Google will turn up a lot.
Matplotlib w/ PyLab is a nice, easy plotting package.
However, since you talk about it, I've got a question regarding this
package. The execution of the code stops after the line:
pylab.show()
which is off course the last line of my code. My problem is that I
have to close the figure window in order to launch my program another
time. I'd like to be able to launch my program many times with
different parameters without having to close the figure windows before
each launch.
Just so you know, I'm using TkAgg backend.
Any hint ?
Thanks,
Cédric
On 4 mai, 15:49, Lou Pecora <pec...@anvil.nrl.navy.mil> wrote:
> In article <1178283196.755609.241...@n59g2000hsh.googlegroups.com>,
> I've already got this package. I just wanted to try something new.
>
> However, since you talk about it, I've got a question regarding this
> package. The execution of the code stops after the line:
> pylab.show()
> which is off course the last line of my code. My problem is that I
> have to close the figure window in order to launch my program another
> time. I'd like to be able to launch my program many times with
> different parameters without having to close the figure windows before
> each launch.
> Just so you know, I'm using TkAgg backend.
>
> Any hint ?
Here's what I do and it works well. I am using a Mac so the text
programs I mention are available there, but I bet you can find similar
programs on Windows, Linus, or Unix (I think Emacs can do this, too).
I use a text editor to write the source code and launch it in a Terminal
window. On the Mac BBEdit does this and you can get its free version
TextWrangler. I can launch a program to do a plot, go back to the
editor to change somehting and launch it again all while the first plot
window is still open. I get two terminal windows waiting on the closing
of their respective plot windows. I can click on each plot window and
bring them to the front for comparison. Of course, I can continue to
launch more and compare many plot windows. Works for me.
Maybe there are other approaches that others can tell about.
As a lightweight alternative to matplotlib, you might be interested in
trying out my *small* (and functionally *limited*) code at:
http://code.google.com/p/graphn. I created it to be hopefully useful
around web graphs, but it only does line graphs and bar charts. It
requires the gd library, but nothing outside of that. I think it's
pretty easy to use, but obviously you'll have to be the judge of that.
There's an option in your matplotlibrc file (personal lives in
$HOME/.matplotlib, default in $PYTHONPATH/matplotlib/mpl-data):
#### CONFIGURATION BEGINS HERE
# the default backend; one of GTK GTKAgg GTKCairo FltkAgg QtAgg TkAgg
# Agg Cairo GD GDK Paint PS PDF SVG Template
backend : TkAgg
numerix : numpy # numpy, Numeric or numarray
interactive : True # see http://matplotlib.sourceforge.net/interactive.html
.....
Take a look at the quoted webpage for details and troubleshooting.
Bernhard
On 7 mai, 14:50, "bernhard.vo...@gmail.com" <bernhard.vo...@gmail.com>
wrote:
> On 4 Mai, 15:57, redcic <cedric.lou...@gmail.com> wrote:
>
> > I've already got this package. I just wanted to try something new.
>
> > However, since you talk about it, I've got a question regarding this
> > package. The execution of the code stops after the line:
> > pylab.show()
> > which is off course the last line of my code. My problem is that I
> > have to close the figure window in order to launch my program another
> > time. I'd like to be able to launch my program many times with
> > different parameters without having to close the figure windows before
> > each launch.
> > Just so you know, I'm using TkAgg backend.
>
> > Any hint ?
>
> There's an option in your matplotlibrc file (personal lives in
> $HOME/.matplotlib, default in $PYTHONPATH/matplotlib/mpl-data):
>
> #### CONFIGURATION BEGINS HERE
> # the default backend; one of GTK GTKAgg GTKCairo FltkAgg QtAgg TkAgg
> # Agg Cairo GD GDK Paint PS PDF SVG Template
> backend : TkAgg
> numerix : numpy # numpy, Numeric or numarray
> interactive : True # seehttp://matplotlib.sourceforge.net/interactive.html