Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Plot with scipy

3 views
Skip to first unread message

redcic

unread,
May 4, 2007, 8:53:16 AM5/4/07
to
Hi all,

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

Lou Pecora

unread,
May 4, 2007, 9:49:53 AM5/4/07
to
In article <1178283196.7...@n59g2000hsh.googlegroups.com>,
redcic <cedric...@gmail.com> wrote:

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.

redcic

unread,
May 4, 2007, 9:57:07 AM5/4/07
to
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 ?

Thanks,

Cédric

On 4 mai, 15:49, Lou Pecora <pec...@anvil.nrl.navy.mil> wrote:
> In article <1178283196.755609.241...@n59g2000hsh.googlegroups.com>,

Lou Pecora

unread,
May 6, 2007, 11:02:03 AM5/6/07
to
In article <1178287027.4...@h2g2000hsg.googlegroups.com>,
redcic <cedric...@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 ?

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.

Kevin T. Ryan

unread,
May 6, 2007, 9:11:07 PM5/6/07
to

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.

bernhar...@gmail.com

unread,
May 7, 2007, 8:50:50 AM5/7/07
to
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 # see http://matplotlib.sourceforge.net/interactive.html
.....

Take a look at the quoted webpage for details and troubleshooting.

Bernhard

redcic

unread,
May 9, 2007, 3:36:48 AM5/9/07
to
Thank you all for your answers. Setting "interactive : True" is often
suggested to me but it does not solve my problem.
I tried different other things (following your advices) but I still
have the same problem. Maybe the source of my problem is the fact that
I use the SciTE editor. What do you think about that ? Any other
idea ?
Thanks again,
Cédric

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

0 new messages