1

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 Answer 1

2

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
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.