0

I am plotting some data (https://jpst.it/23X01) with gnuplot and I am having a weird problem when combining "using" with an expression on the columns.

The basic command gnuplot> plot "test.dat" u 1:4 w l works just fine and displays the following graph

complete curve with gnuplot

But if I use an expression instead gnuplot> plot "test.dat" u 1:($4) w l , some data is discarded.

curve with missing points

The discarded points seem to coincide with low y-values. The problem was observed with both v4.6 patchlevel 6 and v5.0 patchlevel 5.

Am I getting something wrong ? I have used this functionality of gnuplot several times in the past but never had this problem before. Thanks in advance.

1 Answer 1

1

I thought of deleting my question as I found my problem and it is silly, but since others might make the same mistake, I am leaving it for now.

My datafile was not formatted correctly and some columns were "jammed" together (I am amazed gnuplot managed to plot it with the first command). For example:

1415.8510073.5710065.88 61.32 61.58

instead of

1415.85 10073.57 10065.88 61.32 61.58

After I separated the columns correctly, everything went back in order.

Sign up to request clarification or add additional context in comments.

1 Comment

please accept your own solution to indicate that the problem is solved.

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.