~inspirated/arsenal/send-attachments-enforce-mimetype

« back to all changes in this revision

Viewing changes to hooks/graph-upstream

  • Committer: Bryce Harrington
  • Date: 2009-04-14 07:20:37 UTC
  • Revision ID: bryce@canonical.com-20090414072037-8tyqpo3elyy0xl7i
Adding new hook scripts (migrating a few from contrib...) and moving
dependencies into scripts dir.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
 
 
3
if [ -f /etc/arsenal/arsenal.conf ] ; then
 
4
    . /etc/arsenal/arsenal.conf
 
5
fi
 
6
if [ -f /etc/arsenal/site.conf ] ; then
 
7
    . /etc/arsenal/site.conf
 
8
fi
 
9
 
 
10
./upstream -d > upstream.dat
 
11
count=0
 
12
for c in $(head -n 1 upstream.dat); do
 
13
    if [[ $count > 1 ]]; then
 
14
        data="$data \"upstream.dat\" using 1:$count title $count with lines linestyle $count, "
 
15
    fi
 
16
    count=$(( $count + 1 ))
 
17
done
 
18
data="$data \"upstream.dat\" using 1:$count title $count with lines linestyle $count"
 
19
 
 
20
gnuplot << EOF
 
21
set title "Upstreamed Bugs for X Packages in Top 100 (Jan-Mar 2009)"
 
22
set xdata time
 
23
set timefmt "%y%m%d"
 
24
set autoscale
 
25
set yrange [0:100]
 
26
set xrange ["090101":"090331"]
 
27
 
 
28
set term svg size 1024 600
 
29
set style fill solid
 
30
set palette maxcolors 256
 
31
set style line  1 lt rgb "#eec73e" lw 3
 
32
set style line  5 lt rgb "#f0a513" lw 3
 
33
set style line 17 lt rgb "#fb8b00" lw 3
 
34
set style line 20 lt rgb "#f44800" lw 3
 
35
 
 
36
set style line 26 lt rgb "#fdff99" lw 3
 
37
set style line 23  lt rgb "#ffff00" lw 3
 
38
set style line 19 lt rgb "#fdca01" lw 3
 
39
set style line 18 lt rgb "#986601" lw 3
 
40
 
 
41
set style line 30 lt rgb "#f44800" lw 3
 
42
set style line  2 lt rgb "#fd3301" lw 3
 
43
set style line 27 lt rgb "#d40000" lw 3
 
44
set style line 11 lt rgb "#980101" lw 3
 
45
 
 
46
set style line  6 lt rgb "#816647" lw 3
 
47
set style line  8 lt rgb "#565248" lw 3
 
48
set style line  9 lt rgb "#fdd99b" lw 3
 
49
set style line 28 lt rgb "#d9bb7a" lw 3
 
50
 
 
51
set style line 12 lt rgb "#aaccee" lw 3
 
52
set style line  7 lt rgb "#6699cc" lw 3
 
53
set style line 21 lt rgb "#336699" lw 3
 
54
set style line 29 lt rgb "#003366" lw 3
 
55
 
 
56
set style line 15 lt rgb "#b3defd" lw 3
 
57
set style line 14 lt rgb "#0197fd" lw 3
 
58
set style line 22 lt rgb "#0169c9" lw 3
 
59
set style line  3 lt rgb "#013397" lw 3
 
60
 
 
61
set style line 13 lt rgb "#ccff99" lw 3
 
62
set style line 10 lt rgb "#98fc66" lw 3
 
63
set style line  4 lt rgb "#339900" lw 3
 
64
set style line 31 lt rgb "#015a01" lw 3
 
65
 
 
66
set style line 25 lt rgb "#ff00ff" lw 3
 
67
set style line 16 lt rgb "#6600cc" lw 3
 
68
set style line 24 lt rgb "#002b3d" lw 3
 
69
set style line 32 lt rgb "#ff9bff" lw 3
 
70
 
 
71
set grid xtics nomxtics ytics mytics linewidth 0.1
 
72
set xtics in border mirror
 
73
set ytics out border nomirror
 
74
set format x "%m/%d"
 
75
set nomxtics
 
76
set mxtics
 
77
set output "upstream.svg"
 
78
set xlabel "Date"
 
79
set ylabel "Bugs Forwarded Upstream (Percent)"
 
80
set key vertical outside
 
81
plot $data
 
82
EOF
 
83
 
 
84
firefox upstream.svg
 
85