eigen/bench/btl/data/mk_new_gnuplot.sh
Gael Guennebaud c8cbc1665e enhancements of the plot generator:
- removed the ugly X11 and PNG gnuplots terminals
- use enhanced postscript terminal
- use imagemagick to generate the png files (with compression)
- disable the fortran impl by default since it is as meaningless as a "C impl"
- update line settings
2008-07-13 11:46:36 +00:00

37 lines
925 B
Bash
Executable File

#! /bin/bash
WHAT=$1
DIR=$2
cat ../gnuplot_common_settings.hh > ${WHAT}.gnuplot
cat ../${WHAT}.hh >> ${WHAT}.gnuplot
DATA_FILE=`cat ../order_lib`
echo set term postscript color rounded enhanced >> $WHAT.gnuplot
echo set output "'"../${DIR}/$WHAT.ps"'" >> $WHAT.gnuplot
echo plot \\ >> $WHAT.gnuplot
for FILE in $DATA_FILE
do
LAST=$FILE
done
for FILE in $DATA_FILE
do
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
if [ $FILE != $LAST ]
then
echo ", \\" >> $WHAT.gnuplot
fi
done
echo " " >> $WHAT.gnuplot
gnuplot -persist < $WHAT.gnuplot
rm $WHAT.gnuplot
ps2pdf ../${DIR}/$WHAT.ps ../${DIR}/$WHAT.pdf
convert -density 120 -rotate 90 -resize 800 +dither -colors 48 -quality 0 ../${DIR}/$WHAT.ps ../${DIR}/$WHAT.png