You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.7 KiB

  1. #!/bin/bash
  2. WHAT=$1
  3. DIR=$2
  4. cat ../gnuplot_common_settings.hh > ${WHAT}.gnuplot
  5. echo "set title " `grep ${WHAT} ../action_settings.txt | head -n 1 | cut -d ";" -f 2` >> $WHAT.gnuplot
  6. echo "set xlabel " `grep ${WHAT} ../action_settings.txt | head -n 1 | cut -d ";" -f 3` " offset 0,0" >> $WHAT.gnuplot
  7. echo "set xrange [" `grep ${WHAT} ../action_settings.txt | head -n 1 | cut -d ";" -f 4` "]" >> $WHAT.gnuplot
  8. if [ $# > 3 ]; then
  9. if [ "$3" == "tiny" ]; then
  10. echo "set xrange [2:16]" >> $WHAT.gnuplot
  11. echo "set nologscale" >> $WHAT.gnuplot
  12. fi
  13. fi
  14. DATA_FILE=`cat ../order_lib`
  15. echo set term postscript color rounded enhanced >> $WHAT.gnuplot
  16. echo set output "'"../${DIR}/$WHAT.ps"'" >> $WHAT.gnuplot
  17. # echo set term svg color rounded enhanced >> $WHAT.gnuplot
  18. # echo "set terminal svg enhanced size 1000 1000 fname \"Times\" fsize 36" >> $WHAT.gnuplot
  19. # echo set output "'"../${DIR}/$WHAT.svg"'" >> $WHAT.gnuplot
  20. echo plot \\ >> $WHAT.gnuplot
  21. for FILE in $DATA_FILE
  22. do
  23. LAST=$FILE
  24. done
  25. for FILE in $DATA_FILE
  26. do
  27. BASE=${FILE##*/} ; BASE=${FILE##*/} ; AVANT=bench_${WHAT}_ ; REDUC=${BASE##*$AVANT} ; TITLE=${REDUC%.dat}
  28. echo "'"$FILE"'" `grep $TITLE ../perlib_plot_settings.txt | head -n 1 | cut -d ";" -f 2` "\\" >> $WHAT.gnuplot
  29. if [ $FILE != $LAST ]
  30. then
  31. echo ", \\" >> $WHAT.gnuplot
  32. fi
  33. done
  34. echo " " >> $WHAT.gnuplot
  35. gnuplot -persist < $WHAT.gnuplot
  36. rm $WHAT.gnuplot
  37. ps2pdf ../${DIR}/$WHAT.ps ../${DIR}/$WHAT.pdf
  38. convert -background white -density 120 -rotate 90 -resize 800 +dither -colors 256 -quality 0 ../${DIR}/$WHAT.ps -background white -flatten ../${DIR}/$WHAT.png
  39. # pstoedit -rotate -90 -xscale 0.8 -yscale 0.8 -centered -yshift -50 -xshift -100 -f plot-svg aat.ps aat2.svg