|
From: Thomas H. <tph...@gm...> - 2007-03-16 15:01:26
|
I have two commands, that it seems to me should have the same result: a plot is opened with a postscript viewer. However, with one way the postscript output can be read, and with the other it can't. I also show the diff of the output below. Is this as it should be, or a bug? I'd like to be able to do something like what I attempted in make-out-bad.sh, eg, hook up gnuplot to an arbitrary source of input, and then pipe it out to wherever. Otherwise, I'm stuck feeding gnuplot files, can't use arbitrary stdin under all circumstances. *********************** hartman@ds0207:~/learning/gnuplot>gnuplot --version gnuplot 4.0 patchlevel 0 hartman@ds0207:~/learning/gnuplot>cat make-out-bad.sh #!/bin/bash outfile=out-bad.ps rm -f $outfile ( cat save-sin.plt | gnuplot - ) > out-bad.ps; kghostview $outfile; #rm $outfile hartman@ds0207:~/learning/gnuplot>cat make-out-good.sh #!/bin/bash outfile=out-good.ps rm -f $outfile ( gnuplot save-sin.plt ) > $outfile; kghostview $outfile; #rm $outfile hartman@ds0207:~/learning/gnuplot>cat save-sin.plt # File name: save.plt - save a Gnuplot plot as a PostScript file set terminal postscript portrait enhanced mono dashed lw 1 "Helvetica" 14 plot sin(x) hartman@ds0207:~/learning/gnuplot>./compare-out-good-out-bad.sh Terminal type set to 'postscript' Options are 'portrait enhanced monochrome blacktext \ dashed dashlength 1.0 linewidth 1.0 defaultplex \ palfuncparam 2000,0.003 \ butt "Helvetica" 14' 1c1 < gnuplot> gnuplot> gnuplot> %!PS-Adobe-2.0 --- > %!PS-Adobe-2.0 3c3 < %%CreationDate: Fri Mar 16 15:49:56 2007 --- > %%CreationDate: Fri Mar 16 15:49:54 2007 638c638 < gnuplot> %%Trailer --- > %%Trailer |