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 10 big landscape > $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 | |
---|
22 | #echo set xrange \[14200:14550\] >> $FILE |
---|
23 | #echo set xrange \[100:20000\] >> $FILE |
---|
24 | #echo set xrange \[4200:4600\] >> $FILE |
---|
25 | #echo set xrange \[100:400\] >> $FILE |
---|
26 | #echo set xrange \[1000:1600\] >> $FILE |
---|
27 | #echo set xrange \[1600:2100\] >> $FILE |
---|
28 | #echo set xrange \[3000:3500\] >> $FILE |
---|
29 | #echo set xrange \[1600:2000\] >> $FILE |
---|
30 | # echo set boxwidth 0.4 >> $FILE |
---|
31 | |
---|
32 | #echo set logscale x >> $FILE |
---|
33 | echo -n plot >> $FILE |
---|
34 | |
---|
35 | |
---|
36 | PAR1=$2 |
---|
37 | PAR2=$3 |
---|
38 | NAME=A |
---|
39 | |
---|
40 | shift |
---|
41 | shift |
---|
42 | shift |
---|
43 | |
---|
44 | pt=1 |
---|
45 | lt=1 |
---|
46 | |
---|
47 | for i in $* ; do |
---|
48 | echo $i ; |
---|
49 | echo $NAME |
---|
50 | grep -A 1 $PAR1 $i | grep -v "\-\-" | grep -v "#" > $i.tmpplot.x ; |
---|
51 | grep -A 1 $PAR2 $i | grep -v "\-\-" | grep -v "#" > $i.tmpplot.y ; |
---|
52 | paste $i.tmpplot.x $i.tmpplot.y > $i.tmpplot ; |
---|
53 | if test $i != $1 ; then echo -n ", ">>$FILE; fi |
---|
54 | # echo -n " "\"$i.tmpplot\" title \"$NAME\" with $STYLE" " lt $pt >>$FILE ; |
---|
55 | echo -n " "\"$i.tmpplot\" title \"$i\" with $STYLE" " lt $pt >>$FILE ; |
---|
56 | YPLOT="$YPLOT $i.tmpplot.y"; |
---|
57 | case $NAME in |
---|
58 | A) NAME=B;; |
---|
59 | B) NAME=C;; |
---|
60 | C) NAME=D;; |
---|
61 | D) NAME=E;; |
---|
62 | E) NAME=F;; |
---|
63 | F) NAME=G;; |
---|
64 | G) NAME=H;; |
---|
65 | H) NAME=I;; |
---|
66 | I) NAME=J;; |
---|
67 | J) NAME=K;; |
---|
68 | K) NAME=L;; |
---|
69 | L) NAME=M;; |
---|
70 | M) NAME=N;; |
---|
71 | N) NAME=O;; |
---|
72 | esac; |
---|
73 | let pt=$pt+1; |
---|
74 | done ; |
---|
75 | echo >> $FILE |
---|
76 | paste $1.tmpplot.x $YPLOT | grep -v "#" |
---|
77 | |
---|
78 | cat $FILE |
---|
79 | gnuplot $FILE |
---|
80 | rm -f $FILE |
---|
81 | rm -f *.tmpplot* |
---|
82 | |
---|