|
5
|
1 ###
|
|
|
2 #
|
|
|
3 # generate gnuplot input for generating ROI plots (9 per page)
|
|
|
4 # USAGE: gawk -v fileName=${IN_FILE}.tmp.ps \
|
|
|
5 # -f plot.awk \
|
|
|
6 # ${USED_INFILE} |gnuplot 2> /dev/null
|
|
|
7 # ${IN_FILE}.tmp.ps is the file gnuplot write to
|
|
|
8 # ${USED_INFILE} is the uncompressed ROI file.
|
|
|
9 #
|
|
|
10
|
|
|
11
|
|
|
12 BEGIN{
|
|
|
13 # if(fileName==""){
|
|
|
14 # print "fileName not specified: use -v fileName=..."
|
|
|
15 # exit
|
|
|
16 # }
|
|
|
17 print "set terminal postscript color blacktext solid \"Helvetica\" 6"
|
|
|
18 print "set output \""fileName"\""
|
|
|
19 print "set multiplot"
|
|
|
20 print "set size 0.9,0.9"
|
|
|
21 print "set origin 0.1,0.1"
|
|
|
22 pos[1]="0.,0.6"
|
|
|
23 pos[2]="0.3,0.6"
|
|
|
24 pos[3]="0.6,0.6"
|
|
|
25 pos[4]="0.,0.3"
|
|
|
26 pos[5]="0.3,0.3"
|
|
|
27 pos[6]="0.6,0.3"
|
|
|
28 pos[7]="0.,0."
|
|
|
29 pos[8]="0.3,0."
|
|
|
30 pos[9]="0.6,0."
|
|
|
31 idx=0
|
|
|
32 }
|
|
|
33
|
|
|
34 !/^#/{
|
|
|
35 #if($5>100){
|
|
|
36 if(1==1){
|
|
|
37 idx++
|
|
|
38 print "set size 0.3,0.3"
|
|
|
39 print "set origin " pos[idx]
|
|
|
40 print "set title \"" $1,$2,$3,$4 "\\n" $5, $6, $7"\""
|
|
|
41 print "plot \"-\" with lines"
|
|
|
42 split($NF, counts, ",")
|
|
|
43 for(i=1; i<=length(counts);i++){
|
|
|
44 print counts[i]
|
|
|
45 }
|
|
|
46 print "e"
|
|
|
47 if(idx==9){
|
|
|
48 print "unset multiplot"
|
|
|
49 print "set size 0.9,0.9"
|
|
|
50 print "set origin 0.1,0.1"
|
|
|
51 print "set multiplot"
|
|
|
52 idx=0
|
|
|
53 }
|
|
|
54 }
|
|
|
55 }
|