I have a data file with two columns
10 0.5
20 0.8
25 0.3
15 0.6
I want to plot the second column if the first column is less than or e
To skip a point in gnuplot you must give it an invalid value like 1/0:
plot 'data.txt' u 1:($1 <= 20 ? $2 : 1/0) with points
For some plotting styles the presence of invalid values deserves some attention. If the remaining points should be connected e.g. with lines, the line is interrupted at an invalid point.
Since gnuplot version 5.0.6 one can use set datafile missing NaN to treat invalid points like missing ones. The filtered data then behaves as if the invalid points don't exist. See https://stackoverflow.com/a/46070360/2604213 for a working example.