|
From: Chris K <gnu...@li...> - 2006-04-02 10:40:44
|
Daniel J Sebald wrote:
> Daniel J Sebald wrote:
>>> plot "-" binary record=5x2 using 1:2 with linespoints,\
>>> "-" binary record=5x2 using 1:2 with linespoints
>>>
>>> cat "command-2.gp" "binary.dat" "binary.dat" | gnuplot
>>>
>>> The error message seems to indicated the second "-" is the problem:
>>>
>>> gnuplot> plot "-" binary record=5x2 using 1:($2) with
>>> linespoints, "-"
>>> binary record=5x2 using 1:($2)**2 with linespoints
>>>
>>> ^
>>> line 0: warning: Skipping data file with no valid points
>>>
>
> ... I wonder why the above is failing. The warning makes me think that
> gnuplot believes it has run out of data. Might you have an extra CR or
> LF as a result of the cat process?
>
> Actually, this seems to work for me. For example, try the attached
> files with the command
>
> cat "command" "bin1.bin" "bin2.bin" | gnuplot
>
> and you should see a PNG file appear in the directory.
Your example worked. So I have written more test cases, and I have isolated the
trigger for failure.
This works:
set title "test-2.gp"
plot "-" binary record=10 using 0:1 with linespoints,\
"-" binary record=10 using 0:($1)**2 with linespoints
This works:
set title "test-3.gp"
plot "-" binary record=10 using 0:1 with linespoints,\
"-" binary record=5x2 using 1:($2)**2 with linespoints
This fails, saying "line 0: warning: Skipping data file with no valid points"
set title "test-4.gp"
plot "-" binary record=5x2 using 1:2 with linespoints,\
"-" binary record=5x2 using 1:($2)**2 with linespoints
The use of 5x2 instead of 10 in the first plot triggers the error. I am going
to hypothesize that the first use of "record=5x2" causes it to read an amount of
data greater than "record=10". But I have not read the code to check.
I see in datafile.c :
/* Daniel Sebald: added general binary 2d data support. (20 August 2004)
*/
So thanks for the help with this.
--
Chris
|