#! /bin/bash 
# Last edited on 2010-10-07 11:20:12 by stolfilocal

NP="$1"; shift

temp="/tmp/$$"
infile="${temp}.txt"
outfile="${temp}.png"

cat > ${infile}

gnuplot <<EOF
  set term png size 640,320 large
  set output "${outfile}"
  set xrange [-0.5:(${NP}-1+0.5)]
  set nokey
  set zeroaxis
  plot "${infile}" using 1:2 with linespoints
  quit
EOF

cat ${outfile}

rm -f ${temp}.*

