File:PV-Global-2010.svg
From Wikimedia Commons, the free media repository
Jump to navigation
Jump to search
Size of this PNG preview of this SVG file: 534 × 361 pixels. Other resolutions: 320 × 216 pixels | 640 × 433 pixels | 1,024 × 692 pixels | 1,280 × 865 pixels | 2,560 × 1,731 pixels.
Original file (SVG file, nominally 534 × 361 pixels, file size: 32 KB)
File information
Structured data
Captions
Summary
[edit]DescriptionPV-Global-2010.svg |
Deutsch: Länderverteilung im Photovoltaik Global 30 Index English: Distribution of countries in the Photovoltaik Global 30 Index |
Date | |
Source | Own work |
Author | Psirus |
SVG development InfoField | This W3C-invalid plot was created with Matplotlib. |
Source code InfoField | Python code# coding: utf-8
#!/usr/bin/env python
from __future__ import division
import matplotlib.pyplot as plt
from matplotlib.pyplot import annotate
from matplotlib.colors import rgb_to_hsv, hsv_to_rgb, ColorConverter, rgb2hex
from numpy import array, sin, cos, pi
def pie_colors(n, base_color='#1241dd'):
""" Generate suitable colors, adapted from:
http://stackoverflow.com/a/5651670/878419 """
cc = ColorConverter()
r, g, b = cc.to_rgb(base_color)
color = array([[r, g, b]])
hue = rgb_to_hsv(color)[0, 0, 0]
colors = []
step = 1 / n
for i in range(n):
next_color = rgb_to_hsv(color)
next_color[0, 0, 0] = (hue + step*i) % 1.0
rgb_color = hsv_to_rgb(next_color)
r = rgb_color[0, 0, 0]
g = rgb_color[0, 0, 1]
b = rgb_color[0, 0, 2]
colors.append(rgb2hex((r, g, b)))
return colors
fig = plt.figure(figsize=(7, 4))
ax = fig.add_subplot(111)
# Data
fracs = [45, 34, 10, 8, 1, 1, 1]
labels = ("USA", "Deutschland", "Taiwan", "Norwegen", "Japan", "Spanien",
u"Großbritannien")
pieColors = pie_colors(len(fracs))
ax.set_position([0.2, 0.0, 0.4, 0.75])
p = plt.pie(fracs, startangle=90, colors=pieColors)
plt.axis("equal")
# Annotations
y1s = []
for p1, l1, f1 in zip(p[0], labels, fracs):
r = p1.r
dr = r*0.1
t1, t2 = p1.theta1, p1.theta2
theta = (t1+t2)/2.
xc, yc = r/2.*cos(theta/180.*pi), r/2.*sin(theta/180.*pi)
x1, y1 = (r+dr)*cos(theta/180.*pi), (r+dr)*sin(theta/180.*pi)
if x1 > 0 :
x1 = r+2*dr
ha, va = "left", "center"
tt = -180
cstyle = "angle,angleA=0,angleB=%f" % (theta,)
else:
x1 = -(r+2*dr)
ha, va = "right", "center"
tt = 0
cstyle = "angle,angleA=0,angleB=%f" % (theta,)
# Prevent overlapping text
y1 = round(y1*10)/10
if any([(abs(y1 - y) < 0.15) for y in y1s]):
y1 = max(y1s) + 0.15
l1 = l1 + '; ' + str(f1) + '%'
annotate(l1, (xc, yc), xycoords="data", xytext=(x1, y1), textcoords="data",
ha=ha, va=va, arrowprops=dict(arrowstyle="-",
connectionstyle=cstyle, patchB=p1))
y1s.append(y1)
plt.title(u"Länderaufteilung 2010", y = 1.2)
plt.savefig("pv-global-2010.svg", transparent=True, bbox_inches='tight')
|
Licensing
[edit]I, the copyright holder of this work, hereby publish it under the following license:
This file is licensed under the Creative Commons Attribution-Share Alike 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.
- 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 | 18:37, 6 June 2013 | 534 × 361 (32 KB) | Psirus (talk | contribs) | Make background transparent. Tighter crop. | |
20:06, 3 June 2013 | 630 × 360 (32 KB) | Psirus (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
- Usage on en.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 | 427pt |
---|---|
Height | 289pt |