On 2007-04-25, Peter Beattie <[EMAIL PROTECTED]> wrote:
> I am trying to plot something in gnuplot 4.2 using co-ordinates a Python
> 2.5 program computes. Here's what I'm doing:
>
> py> from subprocess import *
> py> plot = Popen("c:/progs/gp/bin/wgnuplot.exe", stdin=PIPE)
> py> plot.stdin.write("plot x*x")
>
> The first command dutifully opens gnuplot, but the second doesn't do
> anything. Could someone favour me with an explanation as to the whyness?

wgnuplot.exe doesn't read commands from stdin.  However,
pgnuplot.exe does (that's why it exists).

It's probably easier to just use the gnuplot-py module:

http://gnuplot-py.sourceforge.net/

The "released" 1.7 version still uses Numeric.  I believe
that it's been converted over to numpy, so if you prefer numpy
over Numeric, you can grab an SVN snapshot.

-- 
Grant Edwards                   grante             Yow! My face is new, my
                                  at               license is expired, and I'm
                               visi.com            under a doctor's care!!!!
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to