My intention is to have loaded variable i in for cycle – I want to have it usable for this cycle. Current state is that gnuplot loads var i from the first echo as a string not var.
SPEED=5
echo "plot '< head -n \"\$((SPEED*i))\" `echo ${INFILE}`' using 1:3 ;">> file.plt
for ((i=1;i<="$FRAMES";i++))
do
echo "
load '`echo ${file.plt}`';
" | gnuplot
done
I think you can probably do all of this in gnuplot directly…
Gnuplot 4.6 makes this even easier:
}
and instead of using
head, you can probably use theeverydatafile modifier (help everyfor details). I think something like the following: