I am new to gnuplot and having a hard time to figure how to do conditional plot.

I have a data file, and I want to plot the data from 1st and 2nd columns to generate a line chart, save to JPEG/PNG file.

test.txt

```
1 9.9999 0
2 9.9999 0
3 9.9999 1
4 5.6000 0
5 3.4000 0
6 9.9999 1

```

What I want to do is plot 1st and 2nd column form this data file, when the value of 2nd column is 9.9999, then set the value to 0. That means whenever 9.9999 happens, it shows as 0 in the chart.

This is the code I am using, but seems doesn't work.

```
plot 'test.txt'  using 1:($2==9.99999?0:$2) with linespoint title 'test'

```