]> git.donarmstrong.com Git - neurodebian.git/blobdiff - tools/nd_apachelogs2subscriptionstats
Merge remote-tracking branch 'neurohydra/master'
[neurodebian.git] / tools / nd_apachelogs2subscriptionstats
index b39df162fb0799ebcbcc61b19fd3306c3faad3d4..f7962ba24fcda13b14203c27b749af5e8d0d89e0 100755 (executable)
@@ -24,12 +24,12 @@ dt = [('ip', '|S16'),
       ('date', float)]
 
 
-def make_figure(data):
+def make_figure(data, ymax):
     fig = pl.figure(figsize=(14,3))
     ax = fig.add_subplot(121)
-    plot_datehist(ax, data, 10, [code for code in cfg.options('release codenames') if cfg.get('release codenames', code).count('Debian')], title="Debian", ymax=11)
+    plot_datehist(ax, data, 10, [code for code in cfg.options('release codenames') if cfg.get('release codenames', code).count('Debian')], title="Debian", ymax=ymax)
     ax = fig.add_subplot(122)
-    plot_datehist(ax, data, 10, [code for code in cfg.options('release codenames') if cfg.get('release codenames', code).count('Ubuntu')], title="Ubuntu", ymax=11)
+    plot_datehist(ax, data, 10, [code for code in cfg.options('release codenames') if cfg.get('release codenames', code).count('Ubuntu')], title="Ubuntu", ymax=ymax)
     fig.autofmt_xdate()
     return fig
 
@@ -104,4 +104,4 @@ if __name__ == '__main__':
         date = datetime.strptime(date, "%d %b %Y")
         data.append((ip.strip(), loc, suite, date2num(date)))
     data = np.array(data, dtype=dt)
-    make_figure(data).savefig(sys.argv[1], bbox_inches='tight', dpi=60)
+    make_figure(data, ymax=13).savefig(sys.argv[1], bbox_inches='tight', dpi=60)