|
From: William Xu <wil...@gm...> - 2007-11-04 01:56:03
|
Hans-Bernhard Bröker <HBB...@t-...> writes: >> 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. Oh, so you mean that in ($4 == 1 ? $3 : 1/0):5, when $4 != 1, even (1/0):5 is a valid coordinate? I was thinking that it could be simply ignored by plot. I was following this from the manual: ,----[ http://www.gnuplot.info/docs/node133.html ] | One trick is to use the ternary ?: operator to filter data: | | | plot 'file' using 1:($3>10 ? $2 : 1/0) | | | which plots the datum in column two against that in column one provided | the datum in column three exceeds ten. 1/0 is undefined; gnuplot quietly | ignores undefined points, so unsuitable points are suppressed. `---- -- William |