File:Kriegsdienstverweigerer Deutschland.svg

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Original file (SVG file, nominally 541 × 237 pixels, file size: 39 KB)

Captions

Captions

Add a one-line explanation of what this file represents

Summary

[edit]
Description
Deutsch: Kriegsdienstverweigerer in Deutschland
Date
Source Own work
Author Lennart Kudling
SVG development
InfoField
 
The SVG code is valid.
 
This diagram was created with Python.
Source code
InfoField

Python code

#  The data is taken from http://www.zivildienst.de/lang_de/Navigation/DasBAZ/Presse/Statistikangebot/Statistikangebot__node.html__nnn=true

#  Python source code to generate a TikZ document:

#-*- 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.zivildienst.de/lang_de/Navigation/DasBAZ/Presse/Statistikangebot/Statistikangebot__node.html__nnn=true

GESTELLTE_ANTRAEGE_PRO_JAHR = [
    (1958, 2447), (1959, 3257), (1960, 5439), (1961, 3804), (1962, 4489), \
    (1963, 3311), (1964, 2777), (1965, 3437), (1966, 4431), (1967, 5963), \
    (1968, 11952), (1969, 14420), (1970, 19363), (1971, 27657), (1972, 33792), \
    (1973, 35192), (1974, 34150), (1975, 32564), (1976, 40618), (1977, 69696), \
    (1978, 39698), (1979, 45454), (1980, 54193), (1981, 58051), (1982, 59776), \
    (1983, 68334), (1984, 43875), (1985, 53907), (1986, 58693), (1987, 62817), \
    (1988, 77048), (1989, 77398), (1990, 74309), (1991, 150722), (1992, 133856), \
    (1993, 130041), (1994, 125694), (1995, 160493), (1996, 156681), (1997, 155329), \
    (1998, 172024), (1999, 174089), (2000, 172089), (2001, 182420), (2002, 189644), \
    (2003, 170726), (2004, 154163), (2005, 139563), (2006, 140756), (2007, 161448), \
    (2008, 156248)]
EINBERUFUNGEN_PRO_JAHR = [
    (1961, 574), (1962, 740), (1963, 860), (1964, 1067), (1965, 634), (1966, 1082), \
    (1967, 872), (1968, 1946), (1969, 3071), (1970, 3933), (1971, 5585), (1972, 7218), \
    (1973, 9641), (1974, 11603), (1975, 13595), (1976, 12579), (1977, 20013), \
    (1978, 17424), (1979, 24189), (1980, 25814), (1981, 25473), (1982, 26816), \
    (1983, 28286), (1984, 32549), (1985, 39280), (1986, 45512), (1987, 48886), \
    (1988, 52587), (1989, 61938), (1990, 94731), (1991, 74450), (1992, 89410), \
    (1993, 102268), (1994, 106050), (1995, 110976), (1996, 127203), (1997, 130108), \
    (1998, 129148), (1999, 129667), (2000, 124888), (2001, 130247), (2002, 136008), \
    (2003, 105484), (2004, 91346), (2005, 83436), (2006, 82966), (2007, 84225), \
    (2008, 85149)]
BESTAND_DURCHSCHNITT_PRO_JAHR = [
    (1975, 15105), (1976, 16254), (1977, 18316), (1978, 25513), (1979, 26794), \
    (1980, 31872), (1981, 33079), (1982, 33574), (1983, 36093), (1984, 38130), \
    (1985, 47351), (1986, 60473), (1987, 70533), (1988, 76398), (1989, 89188), \
    (1990, 89051), (1991, 79091), (1992, 99330), (1993, 115403), (1994, 127566), \
    (1995, 130072), (1996, 130104), (1997, 136989), (1998, 137629), (1999, 138364), \
    (2000, 119455), (2001, 118470), (2002, 112338), (2003, 97165), (2004, 78809), \
    (2005, 66063), (2006, 61745), (2007, 61917), (2008, 63332)]

offsetX = 1958
scaleX = 0.2
scaleY = 0.00003

def xLabel(x, offset, scale):
	realX = (x - offsetX) * scaleX
	
	print '\draw (%f,0) -- (%f,0.1);\n' % (realX, realX)
	print '\\node[below] at (%f,0.0) {%i};' % (realX, x)

def yLabel(y, scale):
	realY = y * scale
	
	print '\draw (0,%f) -- (0.1,%f);\n' % (realY, realY)
	print '\\node[left] at (%f,%f) {%i};' % (0.0, realY, y)

def plot(data, label, offsetX, scaleX, scaleY, style):
	strings = []

	for (x, y) in data:
	    strings.append('(%f,%f)' % ((x - offsetX) * scaleX, y * scaleY))
	
	print '\draw[%s] %s;\n' % (style, "--".join(strings))
	
	labelX = data[-1][0]
	labelY = data[-1][1]
	
	print '\\node[right] at (%f,%f) {%s};' % ((labelX - offsetX) * scaleX, labelY * scaleY, label)

# 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'

# Axes
print '\draw (0,0) -- (%f,0);\n' % ((2008 - offsetX) * scaleX)
print '\draw (0,0) -- (0,%f);\n' % (200000 * scaleY)

# y-axis labels
for y in [2447, 50000, 100000, 150000, 200000]:
	yLabel(y, scaleY)

# x-axis labels
for x in [1960, 1970, 1980, 1990, 2000, 2008]:
	xLabel(x, offsetX, scaleX)

plot(
    GESTELLTE_ANTRAEGE_PRO_JAHR, 'Antr"age', offsetX, scaleX, scaleY, \
    'color=black!50,line width=0.25ex,style=dotted')

plot(
    EINBERUFUNGEN_PRO_JAHR, 'Einberufungen', offsetX, scaleX, scaleY, \
    'color=black!50,line width=0.25ex')

plot(
    BESTAND_DURCHSCHNITT_PRO_JAHR, 'Bestand, durchschnittlich', offsetX, scaleX, scaleY, \
    'color=black!90,line width=0.25ex')

# Footer
print \
    '%\n' \
    '\end{tikzpicture}\n' \
    '\end{document}\n'

Licensing

[edit]
I, the copyright holder of this work, hereby publish it under the following licenses:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
GNU head Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.
You may select the license of your choice.

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current16:35, 12 November 2009Thumbnail for version as of 16:35, 12 November 2009541 × 237 (39 KB)LennyWikipedia~commonswiki (talk | contribs)ticks
19:36, 3 November 2009Thumbnail for version as of 19:36, 3 November 2009541 × 237 (36 KB)LennyWikipedia~commonswiki (talk | contribs){{Information |Description={{de|1=Kriegsdienstverweigerer in Deutschland}} |Source={{own}} |Author=Lenny222 |Date=2009-11-03 |Permission= |other_versions= }}

The following page uses this file:

File usage on other wikis

The following other wikis use this file: