Gabriel Dupras - 2021-02-06

You can tell gnuplot to treat undefined data, such as 1/0, as missing data. Missing data is not plotted and does not leave a gap. See help missing.

set datafile missing NaN
plot "-" using 1:(($3==3)?$2:1/0) with linespoints
1 1 3
2 2 3
3 3 4 # This line has bad data in it that I want to skip
4 4 3
5 5 3
e