#! /bin/bash
# Last edited on 2003-08-10 21:21:08 by stolfilocal

usage="${0##*/} PLTFILE"

if [ $# -ne 1 ]; then
  echo "usage: ${usage}"; exit 1
fi

pltfile="$1"; shift

name=${pltfile%.*}

gnuplot -background white <<EOF

set term png small color
set output "${name}.png"
set xrange [-1.15:+1.15]
set yrange [-1.25:+1.25]

plot \
  "${pltfile}" using 1:2        title "${name}" with linespoints, \
  "${pltfile}" using 1:(column(3)/2)   title "d1" with linespoints, \
  "${pltfile}" using 1:(column(4)/12)  title "d2" with linespoints, \
  "${pltfile}" using 1:(column(5)/72)  title "d3" with linespoints, \
  "${pltfile}" using 1:(column(6)/500) title "d4" with linespoints \

EOF

display ${name}.png

