|
From: <pl...@pi...> - 2015-03-15 15:49:46
|
Hi,
I seem to have an oddity in putting a conditional in the using clause in
v5.0
tail longest.dat
171 3342.447
172 3371.391
173 3400.336
174 3465.342
175 3458.227
176 3324.896
177 3389.902
178 3400.818
179 3429.764
180 3476.738
G N U P L O T
Version 5.0 patchlevel alpha last modified 2014-05-10
gnuplot> plot "longest.dat" using (($1/2*2==$1)?NaN:$1):2
x range is invalid
I'm trying to plot for the even values in col 1.
if I do : using (($1/2*2==$1)?$1:NaN):2 it plots every point
and using (($1/2*2==$1)?NaN:$1):2 complains that it has an empty x
range ( ie using is always returning NaN.
The syntax of my using clause seem right if I test it in a print:
gnuplot> i=179;print (i/2*2==i)?i:NaN
NaN
gnuplot> i=178;print (i/2*2==i)?i:NaN
178
I know I could do this using "every" with that sample data but this is
about the syntax not giving expected result.
Peter.
|