I need to generate a graphic gnuplot using a bash script because I have multiple file to plot.
while [ $j -lt 30 ];
do
if [ -f ./MyFile[$j] ]; then
load 'Plot_Histogramma.plt'
fi
j=$(( $j + 1 ))
done
inside "Plot_Hisogramma.plt" i have
set output "MyFile[$j].eps"
plot "./MyFile[$j]" using 2:1 title "MyTitle" with boxes ls 7 lc rgb "blue"
So I need a method to pass my index variable from the script to the gnuplot. I tried with echo
, printf
and export but maybe, I'm doing something wrong.