Revision 2009,
1.5 KB
checked in by bittner, 18 years ago
(diff) |
|
-
Property svn:executable set to
*
|
Rev | Line | |
---|
[1754] | 1 | #!/bin/sh |
---|
| 2 | unalias rm |
---|
| 3 | |
---|
| 4 | rm -f *.tmpplot* |
---|
| 5 | |
---|
| 6 | PFILE=plot.fig |
---|
| 7 | FILE=tmp.plot |
---|
| 8 | echo $FILE |
---|
| 9 | rm -f $FILE |
---|
| 10 | #echo set term postscript eps monochrome dashed \"Times-Roman\" 24 > $FILE |
---|
| 11 | #echo set term postscript eps color solid > $FILE |
---|
| 12 | echo set term fig color fontsize 18 big > $FILE |
---|
| 13 | echo set output \"$PFILE\" >> $FILE |
---|
| 14 | |
---|
| 15 | |
---|
| 16 | #echo set term x11 > $FILE |
---|
| 17 | #echo set grid >> $FILE |
---|
| 18 | STYLE=$1 |
---|
| 19 | echo set xlabel \"$2\" >> $FILE |
---|
| 20 | echo set ylabel \"$3\" >> $FILE |
---|
| 21 | |
---|
[2009] | 22 | #echo set yrange \[1:1e8\] >> $FILE |
---|
[1754] | 23 | #echo set boxwidth 0.4 >> $FILE |
---|
| 24 | |
---|
[2009] | 25 | echo set logscale y >> $FILE |
---|
[1754] | 26 | echo -n plot >> $FILE |
---|
| 27 | |
---|
[2009] | 28 | #echo -n " " x*x*x*x*x*x*x*log\(x\) title \"O\(k^2 log k\)\" with lines" , " >>$FILE |
---|
[1754] | 29 | |
---|
| 30 | PAR1=$2 |
---|
| 31 | PAR2=$3 |
---|
| 32 | NAME=A |
---|
| 33 | |
---|
| 34 | shift |
---|
| 35 | shift |
---|
| 36 | shift |
---|
| 37 | |
---|
| 38 | pt=1 |
---|
| 39 | lt=1 |
---|
| 40 | |
---|
| 41 | for i in $* ; do |
---|
| 42 | echo $i ; |
---|
| 43 | echo $NAME |
---|
| 44 | grep -A 1 $PAR1 $i | grep -v "\-\-" | grep -v "#" > $i.tmpplot.x ; |
---|
| 45 | grep -A 1 $PAR2 $i | grep -v "\-\-" | grep -v "#" > $i.tmpplot.y ; |
---|
| 46 | paste $i.tmpplot.x $i.tmpplot.y > $i.tmpplot ; |
---|
| 47 | if test $i != $1 ; then echo -n ", ">>$FILE; fi |
---|
[2009] | 48 | echo -n " "\"$i.tmpplot\" title \"$NAME\" with $STYLE" " >>$FILE ; |
---|
[1754] | 49 | YPLOT="$YPLOT $i.tmpplot.y"; |
---|
| 50 | case $NAME in |
---|
| 51 | A) NAME=B;; |
---|
| 52 | B) NAME=C;; |
---|
| 53 | C) NAME=D;; |
---|
| 54 | D) NAME=E;; |
---|
| 55 | E) NAME=F;; |
---|
| 56 | F) NAME=G;; |
---|
| 57 | esac; |
---|
| 58 | let pt=$pt+1; |
---|
| 59 | done ; |
---|
[2009] | 60 | #echo -n ", " 1.2*x*x*log\(x\) title \"O\(k^2 log k\)\" with lines lt 2 " , " >>$FILE |
---|
| 61 | #echo -n " " 0.05*x*log\(x\) title \"O\(k log k\)\" with lines lt 3 " " >>$FILE |
---|
[1754] | 62 | echo >> $FILE |
---|
| 63 | paste $1.tmpplot.x $YPLOT | grep -v "#" |
---|
| 64 | |
---|
| 65 | cat $FILE |
---|
| 66 | gnuplot $FILE |
---|
| 67 | rm -f $FILE |
---|
| 68 | rm -f *.tmpplot* |
---|
| 69 | |
---|
Note: See
TracBrowser
for help on using the repository browser.