File:Pyramide Albanie.PNG
Summary
Description |
Français : Pyramide des âges, Albanie, 2009
English: Population pyramid of Albania, 2009 |
Date | |
Source | Own work by uploaderCategory:PNG created with Gnuplot#Pyramide%20Albanie.PNG |
Author | Demmo |
![]() |
This diagram image could be re-created using vector graphics as an SVG file. This has several advantages; see Commons:Media for cleanup for more information. If an SVG form of this image is available, please upload it and afterwards replace this template with {{vector version available|new image name}} .It is recommended to name the SVG file “Pyramide Albanie.svg”—then the template Vector version available (or Vva) does not need the new image name parameter. |
Licensing
![]() |
I, the copyright holder of this work, release this work into the public domain. This applies worldwide. In some countries this may not be legally possible; if so: I grant anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law. |
Sources
Gnuplot
Version 4.2 patchlevel 2
Gnuplot source
# POPULATION PYRAMID
# Script last modified 30-May-2010
scale = 1000 # ADJUST AS NECESSARY
# The increment would better be automatic, but "set xtics" doesn't
# allow to specify start only.
increment = 50 # ADJUST THIS AS NECESSARY
gap_width = 0.11 # ADJUST THIS AS NECESSARY
# ADJUST TITLES AS NECESSARY
set encoding iso_8859_1
set title "Pyramide des \342ges, Albanie, 2009"
set xlabel "Effectifs (en milliers)"
# Input file contains comma-separated values fields
set datafile separator ","
# Plot to dummy device and retrieve the male/female population range
set term unknown
set autoscale xfix
plot "data.csv" using ($4/scale):2, "data.csv" using (-$5/scale):2
range_male = (GPVAL_X_MAX > -GPVAL_X_MIN) ? GPVAL_X_MAX : -GPVAL_X_MIN
range_female = range_male
central_gap = (range_male + range_female) * gap_width
set term png transparent truecolor size 640,400
#set term svg size 800,500 dynamic font "sans-serif"
set style data boxxyerrorbars
set style fill solid 0.5 border
# Y axis is invisible
unset ytics
set autoscale yfix
# X axis is labeled from zero onwards, with the given increment
set xrange [-range_female-central_gap:range_male]
set xtics nomirror 0,increment
set x2range [range_female:-central_gap-range_male]
set x2tics axis 0,increment
plot \
"data.csv" using (0):2:(0):($4/scale):2:($2+4)\
title "Hommes" linetype rgb "#296dcc",\
"data.csv" using (0):2:(0):($5/scale):2:($2+4) axes x2y1\
title "Femmes" linetype rgb "#aa3f74",\
"data.csv" using (-central_gap/2):($2+1.8):2 title "" with labels
CSV pyramid data file as retrieved from US Census Bureau International Database, without modifications.
Data file "data.csv"
"Midyear Population, by Age and Sex for Albania" Year,Age,"Both Sexes Population","Male Population","Female Population" 2009,Total,3639453,1857086,1782367 2009,0-4,266139,139372,126767 2009,5-9,258765,135432,123333 2009,10-14,316440,165724,150716 2009,15-19,351050,182681,168369 2009,20-24,346638,179322,167316 2009,25-29,288262,147540,140722 2009,30-34,239615,119073,120542 2009,35-39,226496,113288,113208 2009,40-44,225152,113158,111994 2009,45-49,245353,126128,119225 2009,50-54,221223,114592,106631 2009,55-59,170479,88796,81683 2009,60-64,127574,66423,61151 2009,65-69,123948,62412,61536 2009,70-74,96663,48345,48318 2009,75-79,67126,30957,36169 2009,80-84,39573,15337,24236 2009,85-89,20969,6764,14205 2009,90-94,6194,1493,4701 2009,95-99,1576,230,1346 2009,100+,218,19,199
Category:Diagram images that should use vector graphics
Category:Images with Gnuplot source code
Category:PD-self
Category:PNG created with Gnuplot
Category:PNG that should use vector graphics
Category:Pages using deprecated source tags
Category:Population pyramids of Albania
Category:Self-published work