3 # growthplot -- plot the fetchmail population's growth as a function of time
6 # Get data from the NEWS file
7 timeseries >/tmp/growthplot$$
8 grep "^[0-9]" /tmp/growthplot$$ >/tmp/growthnumbers$$
9 grep "^[0-9.]*.[05].0 " /tmp/growthplot$$ >/tmp/growthmajors$$
10 sed '/^4.2.9/,$d' </tmp/growthnumbers$$ >/tmp/growthannounce$$
12 cat >/tmp/growthimage$$ <<EOF
13 set title "Fetchmail project growth history"
14 set xlabel 'Days since baseline'
15 set ylabel 'Participants'
16 set y2label 'Lines of code'
21 set y2range [5000:50000]
22 set key bottom right box
23 set terminal png color
27 # OK, now write the event labels
30 echo "breakheight=510"
31 while read version size friends announce total days date
33 if [ "$version" = '%' ]
35 legend="$size $friends $announce $total $days $date"
36 echo "# Associate $lastday to '$legend'"
37 echo "count = count + 1"
38 echo "lastday = $lastday - 5"
39 echo "lasttotal = $lasttotal"
40 echo "endy = breakheight + 50 + count * 50"
43 to lastday, lasttotal+50 \
45 echo "set label '$legend' at lastday-10, endy+15"
51 ) </tmp/growthplot$$ >>/tmp/growthimage$$
53 # OK, now write the major-release labels
55 while read version size friends announce total days date
57 echo "set arrow from $days, $total - 55 to $days, $total - 15 head"
58 echo "set label '$version' at $days - 5, $total - 65"
60 ) </tmp/growthmajors$$ >>/tmp/growthimage$$
62 cat >>/tmp/growthimage$$ <<EOF
63 plot [] [0:] '/tmp/growthnumbers$$' using 6:5 \
64 title "Both lists" with points 3, \
65 '/tmp/growthannounce$$' using 6:4 \
66 title "fetchmail-announce" with points 5, \
67 '/tmp/growthannounce$$' using 6:3 \
68 title "fetchmail-friends" with points 2, \
69 '/tmp/growthnumbers$$' using 6:2 axes x1y2 \
70 title "Lines of code" with points 7
73 gnuplot /tmp/growthimage$$ >growth.png
77 # growthplot ends here