1

I'm having a problem with pm3d. I have data in the format x y # # # #, and I want to add the four #'s and plot their sum versus x,y with something like this:

set pm3d map
splot 'data' 1:2:($3 + $4 + $5+ $6)

I've made sure that my data has lines wherever the first number changes, but I'm getting the error:

';' expected

after data. If I get rid of everything after data then gnuplot is able to plot, but of course the plot is not what I want.

1 Answer 1

2

You're missing the keyword using.

splot 'data' using 1:2:($3+$4+$5+$6)

I suppose it's an easy one to miss because in the examples it is often abbreviated u:

splot 'data' u 1:2:...
Sign up to request clarification or add additional context in comments.

1 Comment

@alexvas -- No problem. We all make those errors (and then spend hours ripping our hair out because of them).

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.