source: GTP/trunk/App/Demos/Vis/FriendlyCulling/ps_memory_plot3 @ 3223

Revision 3223, 1.5 KB checked in by mattausch, 16 years ago (diff)

worked on stats

Line 
1#!/bin/sh
2unalias rm
3
4rm -f *.tmpplot*
5
6PFILE=plot.fig
7FILE=tmp.plot
8echo $FILE
9rm -f $FILE
10#echo set term postscript eps monochrome dashed \"Times-Roman\" 24 > $FILE
11#echo set term postscript eps color solid > $FILE
12echo set term fig color fontsize 18 big  > $FILE
13echo set output \"$PFILE\" >> $FILE
14
15
16#echo set term x11 > $FILE
17#echo set grid >> $FILE
18STYLE=$1
19echo set xlabel \"$2\" >> $FILE
20echo set ylabel \"$3\" >> $FILE
21
22#echo set yrange \[1:1e8\] >> $FILE
23#echo set boxwidth 0.4 >> $FILE
24
25echo set logscale y >> $FILE
26echo -n plot >> $FILE
27
28#echo -n " " x*x*x*x*x*x*x*log\(x\)  title \"O\(k^2 log k\)\" with lines" , " >>$FILE
29
30PAR1=$2
31PAR2=$3
32NAME=A
33
34shift
35shift
36shift   
37
38pt=1
39lt=1
40
41for 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
48    echo -n " "\"$i.tmpplot\"  title \"$NAME\" with $STYLE" " >>$FILE ;
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;
59done ;
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
62echo >> $FILE
63paste $1.tmpplot.x $YPLOT | grep -v "#"
64
65cat $FILE
66gnuplot $FILE
67rm -f $FILE
68rm -f *.tmpplot*
69
Note: See TracBrowser for help on using the repository browser.