# POPULATION PYRAMIDscale=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 NECESSARYsetencodingiso_8859_1# set title "Mexico - 2009"setxlabel"Poblaci\363n de M\351xico, 2009 (en millones)"# Input file contains comma-separated values fieldssetdatafileseparator","# Plot to dummy device and retrieve the male/female population rangesettermunknownsetautoscalexfixplot"data.csv"using($4/scale):2,"data.csv"using(-$5/scale):2range_male=(GPVAL_X_MAX>-GPVAL_X_MIN)?GPVAL_X_MAX:-GPVAL_X_MINrange_female=range_malecentral_gap=(range_male+range_female)*0.11# ADJUST AS NECESSARYsettermsvgsize800,500dynamicfont"sans-serif"setstyledataboxxyerrorbarssetstylefillsolid0.25border# Y axis has no lines and tics, only labels which are shifted to bar medianssetyzeroaxislinewidth0setyticsaxisscale0setyticsoffset0,second1.8setautoscaleyfix# X axis is labeled from zero onwards, with the given incrementsetxticsnomirror0,incrementplot[-range_female-central_gap:range_male]\
"data.csv"using(0):2:(0):($4/scale):2:($2+5):ytic(2)\
title"Hombres"linetypergb"#296dcc"setkeyleftLeftreverseplot[range_female:-central_gap-range_male]\
"data.csv"using(0):2:(0):($5/scale):2:($2+5):ytic("")\
title"Mujeres"linetypergb"#aa3f74"
רישיון
Public domainPublic domainfalsefalse
ברצוני, בעלי זכויות היוצרים על יצירה זו, לשחרר יצירה זו לנחלת הכלל. זה תקף בכל העולם. יש מדינות שבהן הדבר אינו אפשרי על פי חוק, אם כך: אני מעניק לכל אחד את הזכות להשתמש בעבודה זו לכל מטרה שהיא, ללא תנאים כלשהם, אלא אם כן תנאים כאלה נדרשים על פי חוק.