1
votes

I try to do the following in gnuplot:

if ($2 > 0.001) { $2 == 0.001 } plot file_in_1 u 1:2 w l

I wanted to ask to gnuplot to plot all the value for column two as they are expect when they are higher then some threshold (0.001) in that case I want that those values become equal to that maximum.

I can do it outside the .gnu file using fortran/C but I wondering if I can do it from inside of gnuplot.

Thanks

1

1 Answers

2
votes

define a function for your logic:

f(x)= x>0.001 ? 0.001 : x

then apply it for the second column

plot file_in_1 u 1:(f($2)) w l