I am automating a task to create small graphs using gnuplot. And I need to pass the column number from the datafile that is to be plotted
pfile=system("echo $file")
colnum=system("echo $colnum")
plot pfile using 4:(column(colnum)) title "slot1"
^^^^^^^^^^^^
colnum
is being exported earlier as export colnum=2
I am getting error at the highlighted part. I tried using export/fetch by system command, but it didn't work either
e.g. I tried 4:colnum
, got similar error
"./12.gnuplot.helper.pg", line 29: warning: Skipping data file with no valid points
plot pfile using 4:(column(colnum)) title "slot1"
^
"./12.gnuplot.helper.pg", line 29: x range is invalid