File:Belgian federal election 2014.svg
From Wikimedia Commons, the free media repository
Jump to navigation
Jump to search
![File:Belgian federal election 2014.svg](https://upload.wikimedia.org/wikipedia/commons/thumb/9/9d/Belgian_federal_election_2014.svg/339px-Belgian_federal_election_2014.svg.png?20160329162218)
Size of this PNG preview of this SVG file: 339 × 599 pixels. Other resolutions: 136 × 240 pixels | 272 × 480 pixels | 435 × 768 pixels | 580 × 1,024 pixels | 1,159 × 2,048 pixels | 479 × 846 pixels.
Original file (SVG file, nominally 479 × 846 pixels, file size: 148 KB)
File information
Structured data
Captions
Captions
Add a one-line explanation of what this file represents
Summary
[edit]DescriptionBelgian federal election 2014.svg |
Deutsch: Ergebnisse der Parlamentswahlen in Belgien 2014. Stimmenanteile und Sitzverteilung im Parlament („Kammer“).
English: Results of the Belgian general election, 2014. Distribution of votes and distribution of seats in the parliament ("Kammer"). |
Date | |
Source |
Own work![]() This W3C-unspecified plot was created with Matplotlib. |
Author | Fjalnes |
SVG development InfoField |
Source code
[edit]Matplotlib Source Code in Python: |
---|
import numpy as np
from scipy.ndimage import imread
import pylab as pl
names = ['N-VA','PS','MR','CD&V','OVLD','SP-A','CDH','Groen','Ecolo','VB','PTB-GO!','FDF','PP','Sonstige']
votes = [20.26,11.67,9.64,11.61,9.78,8.83,4.98,5.32,3.30,3.67,1.97,1.80,1.52,5.65]
seats = [33,23,20,18,14,13,9,6,6,3,2,2,1]
colors = ['#fec44f', '#b30000', '#2b8cbe', '#e06b13', '#0868ac', '#c22c1c', '#ec7014', '#a6d96a', '#1a9850', '#8c510a', '#B30000', '#de007b', '#605e8b', '#b3b3b3']
z = sorted(list(zip(names,votes,colors))[:-1], key = lambda x: x[1],reverse = True)
names2 = [x[0] for x in z] + [names[-1]]
votes2 = [x[1] for x in z] + [votes[-1]]
colors2 = [x[2] for x in z] + [colors[-1]]
fig = pl.figure(1,figsize = (4.446 , 8.092))
artists = pl.barh(range(len(names2),0,-1), votes2)
for bar,color,name,value in zip(artists.get_children(),colors2,names2,votes2):
bar.set_facecolor(color)
bar.set_linewidth(0)
bb = bar.get_bbox()
x = bb.x1 + 1
y = bb.y0 #+0.5*(bb.y0-bb.y1)
pl.text(x,y, '%s\n%0.1f' % (name,value) + '%', fontsize=12)
pl.xticks([])
pl.yticks([])
pl.ylim(0.75,15)
ax = pl.gca()
ax.spines['right'].set_visible(False)
ax.spines['top'].set_visible(False)
ax.spines['bottom'].set_visible(False)
ax.spines['left'].set_linewidth(3)
pl.savefig('votes.svg')
pl.figure(2)
ax = pl.subplot(1,1,1)
ax.set_aspect(1)
wedges, texts = ax.pie(0.5*np.array(seats)/np.sum(seats), counterclock=False, startangle=180, colors=colors[:-1], wedgeprops = { 'linewidth' : 0 }, labels = ['%s\n%d'%(n,s) for n,s in zip(names[:-1],seats)], labeldistance = 1.2)
for t in texts:
t.set_horizontalalignment('center')
lw = 2
#draw line around pie
ax.pie([0.5], counterclock=False, startangle=180, colors=['#ffffff'], wedgeprops = { 'linewidth' : lw,'fill':False })
#draw a circle at the center of pie to make it look like a donut
centre_circle = pl.Circle((0,0),0.34,color='black', fc='white',linewidth=lw)
ax.add_artist(centre_circle)
rect = pl.Rectangle((-1,-0.5),2,0.49, facecolor='white', linewidth=0)
#centre_circle.set_clip_path(rect)
ax.add_artist(rect)
pl.savefig('seats.svg')
|
Licensing
[edit]I, the copyright holder of this work, hereby publish it under the following license:
![w:en:Creative Commons](https://upload.wikimedia.org/wikipedia/commons/thumb/7/79/CC_some_rights_reserved.svg/90px-CC_some_rights_reserved.svg.png)
![attribution](https://upload.wikimedia.org/wikipedia/commons/thumb/1/11/Cc-by_new_white.svg/24px-Cc-by_new_white.svg.png)
![share alike](https://upload.wikimedia.org/wikipedia/commons/thumb/d/df/Cc-sa_white.svg/24px-Cc-sa_white.svg.png)
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International 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.
- share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 16:22, 29 March 2016 | ![]() | 479 × 846 (148 KB) | Fjalnes (talk | contribs) | Move "Sonstige" to the bottom. |
09:22, 28 March 2016 | ![]() | 479 × 846 (144 KB) | Fjalnes (talk | contribs) | Change color for FDF and sort by votes. | |
12:48, 26 March 2016 | ![]() | 514 × 870 (135 KB) | Fjalnes (talk | contribs) | User created page with UploadWizard |
You cannot overwrite this file.
File usage on Commons
There are no pages that use this file.
File usage on other wikis
The following other wikis use this file:
- Usage on de.wikipedia.org
Metadata
This file contains additional information such as Exif metadata which may have been added by the digital camera, scanner, or software program used to create or digitize it. If the file has been modified from its original state, some details such as the timestamp may not fully reflect those of the original file. The timestamp is only as accurate as the clock in the camera, and it may be completely wrong.
Width | 135.13997mm |
---|---|
Height | 238.87341mm |
Structured data
26 March 2016
image/svg+xml
b3b934a90ed8a662d96309e3c3fc69f7761283e0
151,427 byte
846 pixel
479 pixel
Hidden categories:
- Invalid SVG created with Inkscape:Charts
- Path text SVG
- CC-BY-SA-4.0
- Self-published work
- Media needing categorization by number of seats (election apportionment diagrams)
- Media needing categorization by year (election apportionment diagrams)
- Files needing categorization by arrangement (election apportionment diagrams)
- Media needing categorization by organization (election apportionment diagrams)
- Media needing categorization by number of parties (election apportionment diagrams)
- Media needing categorization by number of seats per party (election apportionment diagrams)
- Media needing categorization by color (election apportionment diagrams)