Fortraneries/GravityField/plotation.sh

43 lines
840 B
Bash
Raw Normal View History

2022-12-06 12:38:41 +11:00
#!/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)
2022-12-12 10:52:19 +11:00
TXT=$(printf "mb #%05d" $NUMERO)
2022-12-06 12:38:41 +11:00
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}"
2022-12-12 10:52:19 +11:00
set ytics 128
set xtics 128
2022-12-06 12:38:41 +11:00
set grid front
set title "${TXT}"
2022-12-12 10:52:19 +11:00
plot "$SRC" using 1:2 title "loc"
2022-12-06 12:38:41 +11:00
__EOC__
}
# ----------------------------------------------------------
2022-12-12 10:52:19 +11:00
for foo in $(seq 0 5 1999)
2022-12-06 12:38:41 +11:00
do
plot_a_map $foo
done
2022-12-12 10:52:19 +11:00
convert -delay 10 WS/graph/0????.png displacement.gif
2022-12-06 12:38:41 +11:00
# ----------------------------------------------------------