File:Mexicopop-es.svg

Uploaded by Demmo
Upload date 2010-05-13T12:35:12Z
MIME type image/svg+xml
Dimensions 512 × 320 px
File size 28.0 KB

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
Author Demmo
SVG development
InfoField
 The SVG code is valid.
 This plot was created with gnuplot.
  This plot uses embedded text that can be easily translated using a text editor.

Source code

GNUPLOT (Gnuplot) – This Wikidata item has no property P154 (logo). Click here to edit the Wikidata item
GNUPLOT (Gnuplot) – This Wikidata item has no property P154 (logo). Click here to edit the Wikidata item
This media was created with gnuplot (command-line plotting program)
Here is a listing of the source used to create this file.

Deutsch ∙ English ∙ +/−

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 This work has been released into the public domain by its author, Demmo. This applies worldwide.
In some countries this may not be legally possible; if so:
Demmo grants anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

13 May 2010