plotting with

Grant Edwards grante at
Tue Sep 6 04:46:15 CEST 2005

On 2005-09-04, skorpio11 at <skorpio11 at> wrote:
> Still having some issues plotting:
> In attempting as explained above:
> import Gnuplot,Numeric
> filename = ('Default.PL1')
> data =
> y = data[:,1]
> x = data[:,0]
> z = data[:,2]
> //I think u need to take the transpose of this column before
> plotting..
> x=Numeric.transpose(x)
> y=Numeric.transpose(y)
> g=Gnuplot.Gnuplot(debug=1)
> d=Gnuplot.Data(x,y)
> g('set logscale xy')
> g.plot(d)
> The file executes without generating any plot being displayed

The object "g" will be deleted when the scripts ends.  When
that happens, the gnuplot process is killed.  All this probably
happens before the plot window has been mapped to the display.

Add something like "sys.stdin.readline()" to the end of the
program so that it doesn't exit until you hit "Enter".

Grant Edwards                   grante             Yow!  Hmmm... a CRIPPLED
                                  at               ACCOUNTANT with a FALAFEL
                                 sandwich is HIT by a

More information about the Python-list mailing list