#! /bin/sh
himml -c interplot.ml
mv interplot.mlx iplot
chmod +x iplot

EXT=h1-no-alt
PLOT=inter.$EXT.plot
echo >$PLOT
echo "set grid" >>$PLOT
echo "set style fill pattern" >>$PLOT
echo "set data style boxes" >>$PLOT
echo "set logscale x 2" >>$PLOT
echo "set nologscale y" >>$PLOT
echo "set xrange [0.5:]" >>$PLOT
echo "set yrange [-10:]" >>$PLOT
CATS=`(cd tptp; ls)`
CMD=
PASTFILES=
PLOTS=
for i in $CATS
do
  ./iplot tptp/$i/*.bench.$EXT >tptp/$i/inter.$EXT
  PASTFILES="$PASTFILES tptp/$i/*.bench.$EXT"
  ./iplot $PASTFILES >tptp/$i/cumul_inter.$EXT
  PLOTS="\"tptp/$i/cumul_inter.$EXT\" using (\$1==0?0.3:\$1):2 title \"$i\"$CMD$PLOTS"
  CMD=", "
done
echo -n "plot $PLOTS" >>$PLOT
echo >>$PLOT
