File:WMUK membership 2013.svg

From Wikimedia UK
Jump to navigation Jump to search

Original file(SVG file, nominally 600 × 480 pixels, file size: 18 KB)

Wikimedia Commons logo This is a file from the Wikimedia Commons. The description on its description page there is shown below.
Commons is a freely licensed media file repository. You can help.

Summary

Description
English:
Gnuplot.py experiment

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.

Second experiment

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.

First experiment
File history shows attempted SVG rendering using Pygal. My experiment with this graph indicates that Pygal is a poor choice of Python package to support Wikimedia Commons projects, due to the external dependencies which have to be hammered out before any upload to Commons is possible.
Date
Source Own work
Author
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
''')
Source data WMUKmembership2013.dat
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:
w:en:Creative Commons
attribution
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.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

25 February 2014

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current13:26, 27 February 2014Thumbnail for version as of 13:26, 27 February 2014600 × 480 (18 KB)wikimediacommons>FæDrop gnuplot's pointinterval option

There are no pages that use this file.

Metadata