|
From: Ethan M. <merritt@u.washington.edu> - 2007-12-12 20:43:52
|
On Tuesday 11 December 2007 02:32, P=C3=A1draig Brady wrote:
> I tried to get a gnuplot script to read
> from stdin like a normal linux filter using plot '-'
It certainly works in general. Consider the following trivial example,
which draws a big red triangle:
plot '-' with filledcurve
1 1
2 3
3 2
e
Could you please provide a specific example in which it doesn't work?
> I know how to work around this but it's a horrible hack.
> I.E. rather than:
> gen_data | ./plot.gp > file.png
Erk. What is that supposed to be doing?
I suspect that the gnuplot command
plot '-'
doesn't mean what you think it does.
It does not mean "read from original stdin of parent process";
it means "read from the current input stream".
Assuming that the file ./plot.gp calls gnuplot, that means that
plot '-' will read from the file plot.gp.
Please explain exactly what you are trying to do, so that we can
suggest alternatives.
> one needs to do:
> (cat plot.gp; gen_data) | gnuplot > file.png
That command makes no sense to me. Maybe you want this?
file plot.gp contains:
set term png
system "gen_data > temp.dat"
plot "temp.dat"
gnuplot plot.gp > file.png
=2D-=20
Ethan A Merritt Courier Deliveries: 1959 NE Pacific
Dept of Biochemistry
Health Sciences Building
University of Washington - Seattle WA 98195-7742
|