File:WMUK membership 2013.svg
| Uploaded by | Fæ |
|---|---|
| Upload date | 2014-02-27T12:26:31Z |
| MIME type | image/svg+xml |
| Dimensions | 600 × 480 px |
| File size | 17.8 KB |
Summary
| Description |
English:
Last version is created using gnucharts with terminal as SVG. This uses gnuplot.py as a wrapper in Python, which may seem excessive but if using bot automation to refresh graphs this may be quite handy as source data might be lifted from wikitables and the charts updated on the fly using the Commons API. Bug: The recently added pointsinterval option does not appear compatible with Commons' interpretation of plain SVG format.
SVG created using Python with svg.charts package (open source). This package is limited, probably due to needing development. Tweaks were needed to make Commons compatible.
|
| Date | |
| Source | Own work |
| Author | Fæ |
| Other versions |
|
Python source code
|
|---|
#!/usr/bin/env python
'''
WMUKmembership2013.py
User:Fae
Licence: CC-BY
Feb 2014
'''
import numpy as np
import Gnuplot
g=Gnuplot.Gnuplot()
g('''
set terminal svg
set ytic 100
set key right
set output "WMUKmembership2013.svg"
set xdata time
set timefmt "%Y%m"
set xtics format "%b"
set nomxtics
set yrange [0:325]
set title "Wikimedia UK membership (2013)"
plot 'WMUKmembership2013.dat' \
u 1:2 title "Total" w l lc rgb"#aaeeaa", \
'' u 1:2:2 notitle w labels textcolor rgb"#44aa44", \
'' u 1:3 title "Grace" w l lc 3, \
'' u 1:3:3 notitle w labels textcolor rgb"#4444aa", \
'' u 1:4 title "New" w lp pt 71 ps 0.5 lc 4, \
'' u 1:5 title "Expired" w lp pt 71 ps 0.5 lc 1, \
200 notitle w l lc 0 lt 0, 100 notitle w l lc 0 lt 0
''')
201301 276 117 3 0 201302 279 117 13 4 201303 272 94 13 10 201304 285 96 8 23 201305 229 55 5 49 201306 215 39 7 0 201307 214 34 6 0 201308 220 35 11 0 201309 225 32 9 6 201310 238 34 13 6 201311 238 57 4 8 201312 237 66 9 4 |
Licensing
I, the copyright holder of this work, hereby publish it under the following license:
This file is licensed under the Creative Commons Attribution 3.0 Unported license.
- You are free:
- to share – to copy, distribute and transmit the work
- to remix – to adapt the work
- Under the following conditions:
- attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.