gnuplot - operating on a two digit column

2

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?

Gabriel

Posted 2012-08-22T19:07:03.470

Reputation: 508

forgot the exact syntax, but did you try ${22} or $(22) instead? – gt6989b – 2012-08-22T19:15:23.453

Yes, I've tried them both. I've also tried ($22), {$22}, $'22', $"22", '$22' and "$22" – Gabriel – 2012-08-22T19:19:38.807

Answers

2

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

Gabriel

Posted 2012-08-22T19:07:03.470

Reputation: 508

0

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

gt6989b

Posted 2012-08-22T19:07:03.470

Reputation: 543

Thanks but that wasn't helpful either. I finally found the correct syntax so I added my own answer. Cheers. – Gabriel – 2012-08-22T19:29:34.670