source: GTP/trunk/Lib/Vis/Preprocessing/work/plots/ps_histo_plot @ 2009

Revision 2009, 1.3 KB checked in by bittner, 17 years ago (diff)
  • Property svn:executable set to *
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 20 big landscape > $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#echo set yrange \[0:100\] >> $FILE
22#echo set xrange \[0:200000\] >> $FILE
23
24#echo set boxwidth 300.0 >> $FILE
25echo set style fill >> $FILE
26
27#echo set logscale x >> $FILE
28echo -n plot >> $FILE
29
30
31PAR1=$2
32PAR2=$3
33NAME=A
34
35shift
36shift
37shift   
38
39pt=1
40lt=1
41
42for i in $* ; do
43    echo $i ;
44    echo $NAME
45    grep -A 1 $PAR1 $i | grep -v "\-\-" | grep -v "#" > $i.tmpplot.x ;
46    grep -A 1 $PAR2 $i | grep -v "\-\-" | grep -v "#" > $i.tmpplot.y ;
47    paste $i.tmpplot.x $i.tmpplot.y > $i.tmpplot ;
48    if test $i != $1 ; then echo -n ", ">>$FILE; fi
49    echo -n " "\"$i.tmpplot\"  title \"$NAME\" with boxes fill pattern" " lt $pt >>$FILE ;
50    YPLOT="$YPLOT $i.tmpplot.y";
51    case $NAME in
52    A) NAME=B;;
53    B) NAME=C;;
54    C) NAME=D;;
55    D) NAME=E;;
56    E) NAME=F;;
57    F) NAME=G;;
58    esac;
59    let pt=$pt+1;
60done ;
61echo >> $FILE
62paste $1.tmpplot.x $YPLOT | grep -v "#"
63
64cat $FILE
65gnuplot $FILE
66rm -f $FILE
67rm -f *.tmpplot*
68
Note: See TracBrowser for help on using the repository browser.