1#!/bin/bash 2 3# base name of the bench 4# it reads $1.out 5# and generates $1.pdf 6WHAT=$1 7bench=$2 8 9header="rev " 10while read line 11do 12 if [ ! -z '$line' ]; then 13 header="$header \"$line\"" 14 fi 15done < $bench"_settings.txt" 16 17echo $header > $WHAT.out.header 18cat $WHAT.out >> $WHAT.out.header 19 20 21echo "set title '$WHAT'" > $WHAT.gnuplot 22echo "set key autotitle columnhead outside " >> $WHAT.gnuplot 23echo "set xtics rotate 1" >> $WHAT.gnuplot 24 25echo "set term pdf color rounded enhanced fontscale 0.35 size 7in,5in" >> $WHAT.gnuplot 26echo set output "'"$WHAT.pdf"'" >> $WHAT.gnuplot 27 28col=`cat $bench"_settings.txt" | wc -l` 29echo "plot for [col=2:$col+1] '$WHAT.out.header' using 0:col:xticlabels(1) with lines" >> $WHAT.gnuplot 30echo " " >> $WHAT.gnuplot 31 32gnuplot -persist < $WHAT.gnuplot 33 34# generate a png file 35# convert -background white -density 120 -rotate 90 -resize 800 +dither -colors 256 -quality 0 $WHAT.ps -background white -flatten .$WHAT.png 36 37# clean 38rm $WHAT.out.header $WHAT.gnuplot