#!/bin/bash
#
# plot some graphs...

title=$1
file=$2
shift ; shift
graphs=$*

mkdir -p graphs
cd cooked-results
glist=`eval echo $graphs`
{
  echo "set title '$title'"
  echo "set key top left"
  echo "set xlabel 'Number of Drives'"
  echo "set ylabel 'Megabytes per second'"
  echo "set output '../graphs/$file.png'"
  echo "set term png color"
  comma='plot'
  for i in $glist
  do echo -n "$comma '$i' with linespoints"
     comma=,
  done
  echo
  echo "set output '../graphs/$file.eps'"
  echo "set term postscript eps"
#  echo "set size 0.5,0.5"
  echo "replot"
} | gnuplot 
echo "$title" done

