# coding: utf-8
#!/usr/bin/env python
import matplotlib.pyplot as plt
import numpy as np
# data from https://investor-relations.db.com/reports-and-events/annual-reports/
# https://investor-relations.db.com/files/documents/annual-reports/2024/DB-AG-Geschaeftsbericht-2023.pdf page 222
# https://investor-relations.db.com/files/documents/annual-reports/Deutsche_Bank_Geschaeftsbericht_2019.pdf?language_id=3 page 227
data = np.array([
[1975, 39828, 1011],
[1976, 39656, 1066],
[1977, 39418, 1196],
[1978, 40961, 1533],
[1979, 42095, 1847],
[1980, 42225, 1903],
[1981, 42647, 2153],
[1982, 43371, 2247],
[1983, 43926, 3330],
[1984, 44452, 3421],
[1985, 45092, 3759],
[1986, 46431, 4159],
[1987, 47186, 7393],
[1988, 46525, 8244],
[1989, 45594, 10986],
[1990, 55452, 13820],
[1991, 57221, 14179],
[1992, 59916, 14340],
[1993, 56905, 16271],
[1994, 54384, 19066],
[1995, 51957, 22162],
[1996, 49670, 24686],
[1997, 49086, 27055],
[1998, 48742, 26564],
[1999, 51273, 41959],
[2000, 50601, 47710],
[2001, 41191, 45333],
[2002, 33807, 43635],
[2003, 29857, 37825],
[2004, 27093, 38324],
[2005, 26336, 37091],
[2006, 26401, 42448],
[2007, 27779, 50512],
[2008, 27942, 52514],
[2009, 27321, 49732],
[2010, 49265, 52797],
[2011, 47323, 53673],
[2012, 46308, 51911],
[2013, 46377, 51877],
[2014, 45392, 52746],
[2015, 45800, 101100-45800 ],
[2016, 44600, 99700-44600 ],
[2017, 42526, 97535-42526 ],
[2018, 41669, 91737-41669 ],
[2019, 40491, 87597-40491 ],
[2020, 37300, 84700-37300 ],
[2021, 35741, 82969-35741 ],
[2022, 35594, 84930-35594 ],
[2023, 36195, 90130-36195 ]
])
# Prepare axis
fig = plt.figure(figsize=(8, 3))
ax = fig.add_subplot(111)
# Plot data
year = data[:, 0]
national = data[:, 1] / 1000
foreign = data[:, 2] / 1000
ax.stackplot(year, national, foreign,
colors=['blue','green'],
labels=['Inland', 'Ausland']
)
# Cosmetics
plt.xlim(min(year), max(year))
ax.minorticks_on()
fig.subplots_adjust(bottom=0.15)
plt.grid()
delta= " "+ str(min(year)) + "-" + str(max(year))
plt.title('Mitarbeiterentwicklung im Deutsche Bank Konzern ' + delta)
plt.xlabel('Jahr')
plt.ylabel('Mitarbeiter in Tausend')
plt.legend(loc='upper left', borderaxespad=1.5)
# Save figure
plt.savefig('deutschebank.svg', transparent=True)