#!/bin/sh
DIR="plots"
NAME="sample"
if [ ! -d $DIR ]
then
	mkdir $DIR
fi

CMD="-m $NAME.xml --config $NAME.cfg --output-file $DIR/$NAME-plot.txt -v D7"

sspaceex $CMD  > $NAME-screen.txt				

graph -TX -BC -q 0.5 $DIR/$NAME-plot.txt
graph -T "ps" -BC -q 0.5 $DIR/$NAME-plot.txt > $DIR/$NAME-plot.ps
ps2eps -l -B -s b0 -c -n -f $DIR/$NAME-plot.ps
ps2pdf -dEPSCrop $DIR/$NAME-plot.ps