~ubuntu-security/ubuntu-cve-tracker/master

« back to all changes in this revision

Viewing changes to graphing/stack.py

  • Committer: Steve Beattie
  • Date: 2019-02-19 06:18:27 UTC
  • Revision ID: sbeattie@ubuntu.com-20190219061827-oh57fzcfc1u9dlfk
The ubuntu-cve-tracker project has been converted to git.

Please use 'git clone https://git.launchpad.net/ubuntu-cve-tracker' to
get the converted tree.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/python
2
 
releases = ['warty','hoary','breezy','dapper','edgy','feisty','gutsy','hardy','intrepid']
3
 
 
4
 
print '''
5
 
set term png small size 640,480
6
 
set output "packages.png"
7
 
 
8
 
set key off
9
 
set xrange [-1:%d]
10
 
set offsets 0, 0, 100, 0
11
 
set boxwidth 0.2
12
 
 
13
 
set grid ytics
14
 
set ylabel "Packages in main/restricted (i386)"
15
 
''' % (len(releases))
16
 
 
17
 
 
18
 
tics = []
19
 
plots = []
20
 
index = -1
21
 
for rel in releases:
22
 
    index += 1
23
 
    x, y = file("%s.data" % (rel)).readline().strip().split(' ')[1:3]
24
 
    print 'set label "%d" center at %d,%d' % (int(y), int(x), int(y)+100)
25
 
 
26
 
    plots.append('"%s.data" using 2:3:xtic(1) title "%s" with boxes fs solid lc 1' % (rel, rel))
27
 
 
28
 
print "plot " + ", ".join(plots)