43 lines
837 B
Bash
43 lines
837 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
set -e
|
||
|
|
||
|
SRC=WS/data/00013.txt
|
||
|
DST=graph.png
|
||
|
|
||
|
rm WS/graph/*.png
|
||
|
|
||
|
# ----------------------------------------------------------
|
||
|
plot_a_map ()
|
||
|
{
|
||
|
NUMERO=$1
|
||
|
|
||
|
SRC=$(printf "WS/data/%05d.txt" $NUMERO)
|
||
|
DST=$(printf "WS/graph/%05d.png" $NUMERO)
|
||
|
TXT=$(printf "Mass bodies #%05d" $NUMERO)
|
||
|
|
||
|
echo " " $SRC $DST " " $TXT
|
||
|
|
||
|
gnuplot << __EOC__
|
||
|
set term png size 512,512
|
||
|
set xrange [ 0.0 : 1024 ]
|
||
|
set yrange [ 0.0 : 1024 ]
|
||
|
set output "${DST}"
|
||
|
set ytics 256
|
||
|
set xtics 256
|
||
|
set grid front
|
||
|
set title "${TXT}"
|
||
|
plot "$SRC" using 1:2 title "location"
|
||
|
__EOC__
|
||
|
}
|
||
|
# ----------------------------------------------------------
|
||
|
|
||
|
for foo in $(seq 0 8 1999)
|
||
|
do
|
||
|
plot_a_map $foo
|
||
|
done
|
||
|
|
||
|
convert -delay 10 WS/graph/0????.png foo.gif
|
||
|
|
||
|
# ----------------------------------------------------------
|