2008-07-09 22:04:48 +08:00
|
|
|
#! /bin/bash
|
|
|
|
WHAT=$1
|
|
|
|
DIR=$2
|
2008-07-13 05:41:32 +08:00
|
|
|
|
|
|
|
cat ../gnuplot_common_settings.hh > ${WHAT}.gnuplot
|
|
|
|
cat ../${WHAT}.hh >> ${WHAT}.gnuplot
|
2008-07-09 22:04:48 +08:00
|
|
|
|
|
|
|
DATA_FILE=`cat ../order_lib`
|
2008-07-13 19:46:36 +08:00
|
|
|
echo set term postscript color rounded enhanced >> $WHAT.gnuplot
|
|
|
|
echo set output "'"../${DIR}/$WHAT.ps"'" >> $WHAT.gnuplot
|
2008-07-09 22:04:48 +08:00
|
|
|
|
|
|
|
echo plot \\ >> $WHAT.gnuplot
|
|
|
|
|
|
|
|
for FILE in $DATA_FILE
|
|
|
|
do
|
|
|
|
LAST=$FILE
|
|
|
|
done
|
|
|
|
|
|
|
|
for FILE in $DATA_FILE
|
|
|
|
do
|
2008-07-13 05:41:32 +08:00
|
|
|
BASE=${FILE##*/} ; BASE=${FILE##*/} ; AVANT=bench_${WHAT}_ ; REDUC=${BASE##*$AVANT} ; TITLE=${REDUC%.dat}
|
|
|
|
|
|
|
|
echo "'"$FILE"'" `grep $TITLE ../perlib_plot_settings.txt | head -n 1 | cut -d ";" -f 2` "\\" >> $WHAT.gnuplot
|
2008-07-11 02:28:50 +08:00
|
|
|
if [ $FILE != $LAST ]
|
|
|
|
then
|
2008-07-13 05:41:32 +08:00
|
|
|
echo ", \\" >> $WHAT.gnuplot
|
2008-07-11 02:28:50 +08:00
|
|
|
fi
|
2008-07-09 22:04:48 +08:00
|
|
|
done
|
2008-07-13 05:41:32 +08:00
|
|
|
echo " " >> $WHAT.gnuplot
|
|
|
|
|
2008-07-09 22:04:48 +08:00
|
|
|
gnuplot -persist < $WHAT.gnuplot
|
|
|
|
|
|
|
|
rm $WHAT.gnuplot
|
|
|
|
|
2008-07-13 05:41:32 +08:00
|
|
|
ps2pdf ../${DIR}/$WHAT.ps ../${DIR}/$WHAT.pdf
|
2008-07-13 19:46:36 +08:00
|
|
|
convert -density 120 -rotate 90 -resize 800 +dither -colors 48 -quality 0 ../${DIR}/$WHAT.ps ../${DIR}/$WHAT.png
|