I want to define gnuplot output which is a png file.how to define fileName on gnuplot.
#This lines and also Traffic$j are define on my bash file.
# Traffic$j is the name of file and that is valid. Traffic$j is on the loop
# j is loop index
.
.
fileName=Traffic$j
.
.
I try this:
gnuplot -e "filename=${!fileName}" plotFile
But I go this error:
line 0: constant expression required
I try ruakh's idea:
gnuplot -e "filename = '${!fileName}'" plotFile
But I gut this warning:
"plotFile", line 12: warning: Skipping data file with no valid points
line 12? look at my last line of the script.
How can I pass a variable to -e switch on gnuplot?
Update: My plotFile is this:
set terminal png size 720,450 enhanced font "H,11"
set output filename . '.png'
plot '../_numXY' using 2:3:(sprintf('%d', $1)) with labels offset 0,1 point pointtype 7 ps 2 lc rgb "green" notitle, \
filename using 1:2:($3-$1):($4-$2) with vectors linewidth 6 lc rgb "blue" notitle #line 12