File:Ghg pie chart.svg
Original file (SVG file, nominally 1,080 × 1,080 pixels, file size: 42 KB)
Captions
Summary[edit]
DescriptionGhg pie chart.svg |
English: To create similar for another "Annex 1" country or year find the info in
http://di.unfccc.int/flex_annex1 Data is added mid-April for 2 years ago:be careful not to double count by overlapping categories, and insert the figures into the code below. (code could be improved to calculate the value for "Other" as currently it must be calculated manually) Install Python and Matplot on your computer, amend the output file name for your country, run the program and upload to a new commons file. |
Date | |
Source | Own work |
Author | Chidgk1 |
SVG development InfoField | This plot was created with Matplotlib. |
Source code InfoField | Python codeimport matplotlib.pyplot as plt
import numpy as np
plt.rcdefaults()
plt.style.use('ggplot')
plt.rcParams['font.size'] = 25
plt.rcParams['patch.edgecolor'] = 'black'
plt.rcParams['lines.linewidth'] = 1
plt.figure(figsize=[12,12])
labels = ['Electricity from Coal', 'Road Transport', 'Manufacturing and Construction', 'Agriculture', 'Cement', 'Electricity from Gas', 'Home heating/cooking', 'Other']
values = [94,76,60,56,36,34,34,106]
colours = ['#754513','darkgrey','pink','green','lightgrey','khaki','yellow','white']
angle = 90
def func(pct, allvals):
absolute = int(round(pct/100.*np.sum(allvals)))
return "{:.2n}%\n({:d} mt)".format(pct, absolute)
patches, texts, autotexts = plt.pie(values, colors=colours, autopct=lambda pct: func(pct, values), pctdistance=0.6, labels=labels, labeldistance=1.1, shadow=False, startangle=angle)
for at in autotexts:
at.set_fontsize(16.21)
plt.axis('equal')
plt.tight_layout()
plt.gca().set_position([0, 0, 1, 1])
plt.gcf().subplots_adjust(bottom=0.15)
plt.savefig('ghg_pie_chart.svg')
|
Licensing[edit]
- 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 | 10:16, 19 March 2019 | 1,080 × 1,080 (42 KB) | Chidgk1 (talk | contribs) | User created page with UploadWizard |
You cannot overwrite this file.
File usage on Commons
There are no pages that use this file.
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 | 864pt |
---|---|
Height | 864pt |