Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to operate on a column prior to its plotting. This is the line I'm having issues with:

plot campo1 u 1:($22*0.05)

where campo1 is the path to the file. The problem is that gnuplot recognizes $22 not as column 22 but as column 2 multiplied by 2*0.05.

How can I tell gnuplot to use column 22 in the operation?

share|improve this question
forgot the exact syntax, but did you try ${22} or $(22) instead? – gt6989b Aug 22 '12 at 19:15
Yes, I've tried them both. I've also tried ($22), {$22}, $'22', $"22", '$22' and "$22" – Gabriel Aug 22 '12 at 19:19

2 Answers 2

Try plot campo1 u 1:(0.05*$22) instead

share|improve this answer
Thanks but that wasn't helpful either. I finally found the correct syntax so I added my own answer. Cheers. – Gabriel Aug 22 '12 at 19:29
up vote 2 down vote accepted

Found the right syntax, the command is: \$22

share|improve this answer
don't forget to "accept" your answer. – JoshP Aug 29 '12 at 15:23
Yes, thanks for the reminder. – Gabriel Aug 29 '12 at 19:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.