#!/bin/sh
# Public-domain work without warranty — see README:LICENSING for details.
set -e

make clean 409

for n in `seq 2 15`; do
  t=`./409 $n h | awk 'NR==2{print;exit}'`
  test /$1 = /abs && sed -i 's/^ *-//' h
  nn=`printf %02i $n`
  gnuplot << .
    set term pngcairo size 1200,200
    set label '$t' at character 2,.5
    set out 'h$nn.png'
    set autoscale fix
    unset border
    set tics scale 0
    set ytics -1,.2,1
    set format ''
    set grid back lc rgb '#666666' lt 0 lw 1
    set grid noxtics
    set key off
    plot 'h' with lines lc rgb '#0055aa' lt 1 lw 2
.
done
