X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=tools%2Fnd_apachelogs2subscriptionstats;h=f7962ba24fcda13b14203c27b749af5e8d0d89e0;hb=ed2f469fb128ce1cca498ed831b9a6d2ffc85c0f;hp=b39df162fb0799ebcbcc61b19fd3306c3faad3d4;hpb=418ad95a1bde551ab6cf8229f24615dc5ab5c24d;p=neurodebian.git diff --git a/tools/nd_apachelogs2subscriptionstats b/tools/nd_apachelogs2subscriptionstats index b39df16..f7962ba 100755 --- a/tools/nd_apachelogs2subscriptionstats +++ b/tools/nd_apachelogs2subscriptionstats @@ -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)