|
From: <HBB...@t-...> - 2007-11-03 21:25:54
|
William Xu wrote:
> For example,
>
> ,----
> | #a b c
> | 1 3 5
> | 1 4 9
> | 2 3 7
> | 1 2 6
> `----
This example fits neither your given command (no columns 4 and 5), nor
the claimed behaviour. It does plot a line (from (3,7) to (2,6)) after
being adjusted to the modified format:
gnuplot> p '-' u ($1==1? $2:1/0):3 w lp
input data ('e' ends) > 1 3 5
input data ('e' ends) > 1 4 9
input data ('e' ends) > 2 3 7
input data ('e' ends) > 1 2 6
input data ('e' ends) > e
> The data file should be okay.
How do you know that, given that the only symptoms you actually
described say otherwise?
> Anyway, i find i can embed shell command
> into plot, so using awk, it draws linespoints as expected.
> ,----
> | plot "< awk '{ if($4==1) print $1, $2, $3, $4, $5}' result.log" using 3:5 title '1 session' with linespoints
> `----
> which should do the same as:
>>> ,----
>>> | plot 'result.log' using ($4 == 1 $3 : 1/0):5 title '1 session' with linespoints
>>> `----
>
> right?
No. Data that's not there at all (because 'awk' ate it) is not quite
the same as data with infinite or undefined coordinates.
|