r95494 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r95493‎ | r95494 | r95495 >
Date:16:50, 25 August 2011
Author:giovanni
Status:deferred
Tags:
Comment:
added normplot.py
Modified paths:
  • /trunk/tools/wsor/editor_lifecycle/normplot.py (modified) (history)

Diff [purge]

Index: trunk/tools/wsor/editor_lifecycle/normplot.py
@@ -46,6 +46,7 @@
4747 M = len(markers)
4848 C = len(colors)
4949 labeltempl = r'$10^{%d} \leq a < 10^{%d}$'
 50+labeltempl = '%d-%d edits/month'
5051
5152 if __name__ == '__main__':
5253 ns = parser.parse_args()
@@ -68,13 +69,14 @@
6970 idx = np.argsort(cohort)
7071 cohort = cohort[idx]
7172 peak = peak[idx] / peak.mean()
 73+ labeldata = (10 ** (a - 1) * 86400.0 * 30, 10 ** a * 86400.0 * 30)
7274 l, = ax.plot(cohort, peak, marker=markers[i % M], color=colors[i % C],
73 - ls='none', mec=colors[i % C], label=labeltempl % (a-1, a), ms=8,
 75+ ls='none', mec=colors[i % C], label=labeltempl % labeldata, ms=8,
7476 alpha=.65)
7577 lines.append(l)
7678
7779 pp.figlegend(lines, [ l.get_label() for l in lines ],
78 - loc='center right', prop=FontProperties(size='medium'))
 80+ loc='center right', prop=FontProperties(size='small'))
7981
8082 if ns.xlim:
8183 pp.xlim(datetime(ns.xlim[0],1,1), datetime(ns.xlim[1],1,1))

Status & tagging log