Ethan Merritt - 2025-05-09

I think the "exclude" functionality is already possible in current gnuplot using the if keyword.

plot data using 1:2 if (int($0)%5 != 0)
is equivalent to
plot data exclude 5::0 using 1:2

The if mechanism can also handle more complicated combinations although it doesn't provide a simple syntax like you show in your second request. Something like this:

function $Select() << EOF
    p = int(column(0))
    point_ok = (p == 1 || p == 2 || p == 3 || (p >= 7 && p <= 10))
    b = int(column(-2))
    block_ok = (b == 3 || b == 5 || b == 9)
    return (point_ok && block_ok)
EOF

set title "complicated selection criteria"
plot $BLOCKS using 1:2 if ($Select())

See attached example script