gnuplot macro dollar sign substitution -



gnuplot macro dollar sign substitution -

in gnuplot 4.6.p3, when phone call script choses column should plot file, through

call 'fitmodes.gnp' 12 "0.95" 1 "-50"

with (the problem part of) 'fitmodes.gnp' beingness :

c(x)= x==1?'using 3:(abs($$5)):6': x==2?'using 3:(abs($$7)):8': x==3?'using 3:(abs($$9)):10':0 column = c($2) #print check value of variable print "column=",column p "th$0/b$1/m$3/data_$0-$1-$3.txt" @column t 'data' w yerrorlines pt 7 lc @cblue

which gives me "invalid expression" output:

gnuplot> phone call 'fitmodes.gnp' "12" 0.95 1 "-50" column=using 3:(abs($5)):6 gnuplot> p "th12/b0.95/m-50/data_12-0.95--50.txt" using 3:(abs()):6 t 'data' w yerrorlines pt 7 lc rgbcolor "#0083ab"

due absence of column number in abs() function despite $5 beingness there in column variable. thought why ?

use column function instead of referring columns shortcut $...:

c(x)= x==1?'using 3:(abs(column(5))):6': x==2?'using 3:(abs(column(7))):8': x==3?'using 3:(abs(column(9))):10':0 column = c($2)

macros gnuplot

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -