1
votes

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

1 Answers

2
votes

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:...