#! /bin/bash
# Last edited on 2023-06-09 11:44:15 by stolfi

dfile="exp_shell.dat"

exp_shell.py > ${dfile}

if [[ ! ( -s ${dfile} ) ]]; then echo "** empty file" 1>&2; exit 1; fi

gnuplot << EOF

set term x11 size 900,900
set size ratio -1

set xrange[-451:+451]
set yrange[-201:+601]

set xzeroaxis
set yzeroaxis

m(k) = (60*column(k))

plot \
  "${dfile}" using 6:8                  title "o(t)" with points  pt 7 ps 0.5 lc rgb '#000000', \
  ""         using 6:8:(m(9)):(m(11))   title "u(t)" with vectors lt 1 lc rgb '#ff0000', \
  ""         using 6:8:(m(12)):(m(14))  title "w(t)" with vectors lt 1 lc rgb '#006600'
pause mouse

plot \
  "${dfile}" using 6:8                 title "o(t)" with points      pt 7 ps 0.5 lc rgb '#000000', \
  ""         using 2:4                 title "c(t)" with linespoints pt 7 ps 0.5 lt 1 lc rgb '#0000ff', \
  ""         using 2:4:5               title "r(t)" with circles     lt 1 lc rgb '#ff0000'

pause mouse
EOF
