File:Mexicopop-es.svg

Summary

Description
Deutsch: Bevölkerungspryramide von Mexiko, 2009
English: Population pyramid of Mexico, 2009
Español: Pirámide de población de México, 2009
Date
Source Own work by uploader
 This W3C-unspecified plot was created with Gnuplot.
Category:Unspec SVG created with Gnuplot#00050420Mexicopop-es.svg
Author Demmo

Gnuplot

Version 4.2 patchlevel 2

Gnuplot source, localized for es
# POPULATION PYRAMID

scale = 1000000 # ADJUST AS NECESSARY
# The increment would better be automatic, but "set xtics" doesn't
# allow to specify start only.
increment = 1 # ADJUST THIS AS NECESSARY

# ADJUST TITLES AS NECESSARY
set encoding iso_8859_1
# set title "Mexico - 2009"
set xlabel "Poblaci\363n de M\351xico, 2009 (en millones)"

# 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) * 0.11 # ADJUST AS NECESSARY

set term svg size 800,500 dynamic font "sans-serif"

set style data boxxyerrorbars
set style fill solid 0.25 border

# Y axis has no lines and tics, only labels which are shifted to bar medians
set yzeroaxis linewidth 0
set ytics axis scale 0
set ytics offset 0, second 1.8
set autoscale yfix

# X axis is labeled from zero onwards, with the given increment
set xtics nomirror 0,increment

plot [-range_female-central_gap:range_male]\
 "data.csv" using (0):2:(0):($4/scale):2:($2+5):ytic(2)\
  title "Hombres" linetype rgb "#296dcc"

set key left Left reverse

plot [range_female:-central_gap-range_male]\
 "data.csv" using (0):2:(0):($5/scale):2:($2+5):ytic("")\
  title "Mujeres" linetype rgb "#aa3f74"

Licensing

Public domain 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.
Category:Self-published work#Mexicopop-es.svgCategory:PD-self#Mexicopop-es.svg Category:Population pyramids of Mexico#2009 Category:SVG population pyramids
Category:PD-self Category:Pages using deprecated source tags Category:Population pyramids of Mexico Category:SVG population pyramids Category:Self-published work Category:Unspec SVG created with Gnuplot