Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 2 down vote accepted

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

share|improve this answer
1  
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

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .