File:Polulation Pyramid Germany 2010.svg
מתוך Wikimedia Commons
קפיצה לניווט
קפיצה לחיפוש
גודל התצוגה המקדימה הזאת מסוג PNG של קובץ ה־SVG הזה: 234 × 325 פיקסלים. רזולוציות אחרות: 173 × 240 פיקסלים | 345 × 480 פיקסלים | 553 × 768 פיקסלים | 737 × 1,024 פיקסלים | 1,474 × 2,048 פיקסלים.
לקובץ המקורי (קובץ SVG, הגודל המקורי: 234 × 325 פיקסלים, גודל הקובץ: 39 ק"ב)
מידע על הקובץ
נתונים מובְנים
כיתובים
תקציר
[עריכה]תיאורPolulation Pyramid Germany 2010.svg | Polulation Pyramid Germany 2010 |
תאריך יצירה | |
מקור | נוצר על־ידי מעלה היצירה |
יוצר | Lennart Kudling |
SVGהתפתחות InfoField | |
קוד מקור InfoField | Python code#-*- coding: iso-8859-1 -*
# This Python program prints a LaTeX/TikZ document to stdout.
# Pipe the output of this script to a "foo.tex" file and afterwards call "pdflatex foo"
# The resulting "foo.pdf" file can be converted to SVG using
# http://www.tlhiv.org/MetaPost/tools/mptosvg/
# Data source:
# http://www.destatis.de/bevoelkerungspyramide/12kvb1w1.js
#
# 1950 + 60 = 2010
# popMale = popData[0][age][60]
# popFemale = popData[1][age][60]
data = \
[
(0, 341, 323)
, (1, 350, 333)
, (2, 353, 335)
, (3, 348, 329)
, (4, 353, 335)
, (5, 363, 345)
, (6, 364, 345)
, (7, 370, 351)
, (8, 379, 359)
, (9, 395, 377)
, (10, 398, 376)
, (11, 406, 385)
, (12, 419, 398)
, (13, 412, 390)
, (14, 399, 379)
, (15, 406, 385)
, (16, 422, 401)
, (17, 433, 413)
, (18, 451, 429)
, (19, 498, 473)
, (20, 497, 474)
, (21, 515, 492)
, (22, 508, 486)
, (23, 502, 485)
, (24, 490, 475)
, (25, 490, 475)
, (26, 496, 482)
, (27, 511, 497)
, (28, 509, 498)
, (29, 515, 503)
, (30, 490, 479)
, (31, 484, 473)
, (32, 481, 469)
, (33, 474, 463)
, (34, 464, 451)
, (35, 470, 460)
, (36, 476, 465)
, (37, 524, 509)
, (38, 581, 561)
, (39, 609, 586)
, (40, 657, 628)
, (41, 689, 658)
, (42, 706, 676)
, (43, 726, 694)
, (44, 734, 696)
, (45, 745, 710)
, (46, 740, 707)
, (47, 714, 687)
, (48, 700, 681)
, (49, 680, 662)
, (50, 658, 641)
, (51, 624, 608)
, (52, 610, 597)
, (53, 592, 584)
, (54, 572, 569)
, (55, 558, 564)
, (56, 538, 548)
, (57, 537, 550)
, (58, 525, 539)
, (59, 527, 542)
, (60, 509, 520)
, (61, 467, 476)
, (62, 436, 450)
, (63, 379, 393)
, (64, 331, 351)
, (65, 438, 464)
, (66, 443, 471)
, (67, 427, 458)
, (68, 510, 556)
, (69, 529, 587)
, (70, 511, 576)
, (71, 468, 535)
, (72, 427, 498)
, (73, 403, 483)
, (74, 377, 461)
, (75, 338, 424)
, (76, 262, 338)
, (77, 248, 332)
, (78, 240, 334)
, (79, 238, 344)
, (80, 216, 326)
, (81, 199, 313)
, (82, 166, 288)
, (83, 142, 277)
, (84, 122, 264)
, (85, 95, 236)
, (86, 80, 212)
, (87, 73, 197)
, (88, 63, 183)
, (89, 51, 154)
, (90, 31, 99)
, (91, 16, 54)
, (92, 12, 41)
, (93, 10, 36)
, (94, 10, 34)
, (95, 9, 33)
, (96, 6, 26)
, (97, 4, 18)
, (98, 2, 12)
, (99, 1, 8)
]
# Find the maximums.
maxMale = 0
maxFemale = 0
for (_, popMale, popFemale) in data:
if popMale > maxMale:
maxMale = popMale
if popFemale > maxFemale:
maxFemale = popFemale
# Header
print \
'\documentclass[a4paper,10pt]{article}\n' \
'%\n' \
'\usepackage{ngerman}\n' \
'\usepackage{tikz}\n' \
'\usepackage[active,tightpage]{preview}\n' \
'\PreviewEnvironment{tikzpicture}\n' \
'%\n' \
'\usepackage[latin1]{inputenc}\n' \
'\usepackage[T1]{fontenc}\n' \
'\usepackage{fourier}\n' \
'%\n' \
'\\begin{document}\n' \
'%\n' \
'\\begin{tikzpicture}\n' \
'%\n'
def yLabel(y, scale):
realY = y * scale
print '\\node at (%f,%f) {%i};' % (0.0, realY, y)
def yLines(offset, xScale, yScale, printMale, horizontalLines):
if printMale:
maxPop = maxMale
else:
maxPop = maxFemale
for age in horizontalLines:
x = maxPop * xScale + offset
y = yScale * age
print '\draw[color=white] (%f,%f) -- (%f,%f);' % (offset, y, x, y)
def halfPyramid(maleFemaleData, offset, xScale, yScale, printMale, doFill):
if printMale:
color = 'gray'
else:
color = 'gray!50'
if doFill:
print '\path[fill] (%f,0)[color=%s] --' % (offset, color)
else:
print '\draw [color=%s]' % color
for (age, popMale, popFemale) in maleFemaleData:
if age is not 0:
print "--"
if printMale:
x = popMale
else:
x = popFemale
yStart = yScale * age
yEnd = yScale * (age + 1.0)
xMaleStart = offset
xMaleEnd = xScale * x + xMaleStart
print '(%f,%f) -- (%f,%f)' % (xMaleEnd, yStart, xMaleEnd, yEnd)
if doFill:
print '(%f,%f) -- cycle;' % (offset, 100.0 * yScale)
else:
print ';'
xScale = 0.004
xMargin = 0.30
yScale = 0.08
halfPyramid(data, -xMargin, -xScale, yScale, True, True)
halfPyramid(data, xMargin, xScale, yScale, False, True)
pyramidLines = [20, 40, 60, 80]
yLines(-xMargin, -xScale, yScale, True, pyramidLines)
yLines(xMargin, xScale, yScale, False, pyramidLines)
halfPyramid(data, -xMargin, -xScale, yScale, False, False)
halfPyramid(data, xMargin, xScale, yScale, True, False)
for i in [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100]:
yLabel(i, yScale)
print '\\node[anchor=south] at (0,%f) {Age};' % (105.0 * yScale)
print '\\node[anchor=west] at (%s,%f) {Men};' % (-maxMale * xScale - xMargin, 100.0 * yScale)
print '\\node[anchor=east] at (%s,%f) {Women};' % (maxFemale * xScale + xMargin, 100.0 * yScale)
# Footer
print \
'%\n' \
'\end{tikzpicture}\n' \
'\end{document}\n'
|
רישיון
[עריכה]אני, בעל זכויות היוצרים על עבודה זו, מפרסם בזאת את העבודה תחת הרישיון הבא:
הקובץ הזה מתפרסם לפי תנאי רישיון קריאייטיב קומונז ייחוס 3.0 לא מותאם.
- הנכם רשאים:
- לשתף – להעתיק, להפיץ ולהעביר את העבודה
- לערבב בין עבודות – להתאים את העבודה
- תחת התנאים הבאים:
- ייחוס – יש לתת ייחוס הולם, לתת קישור לרישיון, ולציין אם נעשו שינויים. אפשר לעשות את זה בכל צורה סבירה, אבל לא בשום צורה שמשתמע ממנה שמעניק הרישיון תומך בך או בשימוש שלך.
היסטוריית הקובץ
ניתן ללחוץ על תאריך/שעה כדי לראות את הקובץ כפי שנראה באותו זמן.
תאריך/שעה | תמונה ממוזערת | ממדים | משתמש | הערה | |
---|---|---|---|---|---|
נוכחית | 17:03, 31 במאי 2010 | 325 × 234 (39 ק"ב) | LennyWikipedia~commonswiki (שיחה | תרומות) | {{Information |Description= |Source={{own}} |Date= |Author= Lenny222 |Permission= |other_versions= }} |
אין באפשרותך לדרוס את הקובץ הזה.
שימוש בקובץ
הדף הבא משתמש בקובץ הזה: