Pass GNUplot variable to system(/usr/bin/awk) -
this command works in gnuplot script find line in file value -1.98
system("/usr/bin/awk '/-1.98/{print $2 $1}' /path/to/myfile.txt")
given gnuplot variable stats_min_y resulting plot command, how pass stats_min_y system() call in place of -1.98 value?
system("/usr/bin/awk '/stats_min_y/{print $2 $1}' /path/to/myfile.txt")
and similar variants fail demand missing parenthesis.
you can pass result sprintf
directly system
. example:
a = system( sprintf("awk '/%g/{print $2,$1}' myfile.txt", stats_min_y) )
Comments
Post a Comment