Hello,
this case is similar to https://sourceforge.net/p/gnuplot/bugs/1107/ of Hiroki Motoyoshi in that NaN leads to data points shown at the last value instead of being omitted. The difference to that bug is that the NaN is not read from the binary file but calculated while reading a binary file.
My test data consists of two columns,
$1 is 0 1 2 3 4 5 6 7 8,
$2 is 3 2 1 0 0 0 1 2 3.
I prepared two files containing that data, a binary and a text file.
I want to suppress $1 where $2 == 0.
plot 'binNaNtest.dat' \
binary record=0 format="%2uchar" using 0:1 w l, '' \
binary record=0 format="%2uchar" using 0:2 w l, '' \
binary record=0 format="%2uchar" using 0:(($2>0.5?1.:1/0)*$1) w p;
plot 'txtNaNtest.dat' \
using 0:1 w l, '' \
using 0:2 w l, '' \
using 0:(($2>0.5?1.:1/0)*$1) w p;
It works with the text file, but gnuplot shows three extra points with y=2 when reading the binary file.
4rd leaf:
Just a reminder to the problem stated in the first post of this thread. Invalidating y values (as exemplified in the manual and perfectly working with text files) should also work with binary files.