File:Iran-age-pyramid.svg
Summary
| Description |
English: Demography of Iran in 2011. Source: Statistical Centre of Iran http://www.amar.org.ir/Portals/1/Iran/90.pdf |
| Date | |
| Source | Own work |
| Author | Psirus |
| SVG development | |
| Source code | Python code# coding: utf-8
#!/usr/bin/env python
import matplotlib.pyplot as plt
import numpy as np
# first column is total number of people
# second column is percentage of the population
data = np.array([
[6232552, 8.29],
[5657791, 7.53],
[5671435, 7.55],
[6607043, 8.79],
[8414497, 11.20],
[8672654, 11.54],
[6971924, 9.28],
[5571018, 7.41],
[4906749, 6.53],
[4030481, 5.36],
[3527408, 4.69],
[2680119, 3.57],
[1862907, 2.48],
[1343731, 1.79],
[1119968, 1.49],
[913531, 1.22],
[919539, 1.22]])
labels = [
'0-4',
'5-9',
'10-14',
'15-19',
'20-24',
'25-29',
'30-34',
'35-39',
'40-44',
'45-49',
'50-54',
'55-59',
'60-64',
'65-69',
'70-74',
'75-79',
'80 and over']
# Prepare axis
fig = plt.figure(figsize=(9, 5))
ax = fig.add_subplot(111)
y_pos = np.arange(len(labels))
percentages = data[:, 1]
ax.barh(y_pos, percentages, align='center')
plt.yticks(y_pos, labels)
plt.axis('tight')
plt.title('Iranian Demography 2011')
plt.xlabel('Percentage')
plt.savefig('iran-demography.svg', transparent=True)
|
Licensing
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.