Below is the code meant to output successive images for a gif file:
for i in {1..600}
do
python Phy_asg.py $i
gnuplot <<- EOF
unset tics;unset key;unset border
set xrange [-15:15]
set yrange [-15:15]
set arrow 1 from 0.012*$i,cos(0.012*$i)-pi to sin(0.024*$i),cos(0.012*$i ) nohead ls 8 lw 2
set arrow 2 from sin(0.024*$i)+pi,0.012*$i to sin(0.024*$i),cos(0.012*$i ) nohead ls 8 lw 2
plot "< seq -9 .2 -3.1" u (cos(2*$1)):($1) with lines
replot "< seq -9 .2 -3.1" u ($1):(cos(2*$1)) with lines
replot "data_asg.txt" with lines lt 22 lw 2
set terminal png size 512,512
set output "Phy_gif_$i.png"
replot
EOF
done
Here the Phy_asg.py is python script to produce data in form of text file and its name is data_asg.txt. The shell gives me error in the line 10. It says:
gnuplot> plot "< seq -9 .2 -3.1" u (cos(2*)):() with lines
^
line 0: invalid expression
I am not able to figure out the problem. Is it with the seq command or formatting error.