feat: Plot mean vacciantion rates history
This commit is contained in:
parent
f874827f9f
commit
706cbe9669
1 changed files with 3 additions and 2 deletions
5
plot.py
5
plot.py
|
@ -63,7 +63,7 @@ extrapolated_dates = np.array([dates[0] + datetime.timedelta(days=i) for i in ra
|
||||||
|
|
||||||
extrapolated_vaccinations = mean_vaccinations_daily * range(days_extrapolated)
|
extrapolated_vaccinations = mean_vaccinations_daily * range(days_extrapolated)
|
||||||
|
|
||||||
|
mean_vaccinations_daily_up_to_date = np.round(cumulative / range(1, len(cumulative) + 1))
|
||||||
|
|
||||||
# Stand aus Daten auslesen
|
# Stand aus Daten auslesen
|
||||||
#stand = dates.iloc[-1]
|
#stand = dates.iloc[-1]
|
||||||
|
@ -103,7 +103,8 @@ def plot_extrapolation_portion(percentage):
|
||||||
|
|
||||||
ax2 = ax.twinx()
|
ax2 = ax.twinx()
|
||||||
|
|
||||||
ax.bar(dates, daily, label='Tägliche Impfungen')
|
ax.bar(dates, daily, label='Tägliche Impfungen', color='blue')
|
||||||
|
ax.plot(dates, mean_vaccinations_daily_up_to_date, color='violet', label='Durchschnittliche Impfquote\nbis zu diesem Tag (inkl.)')
|
||||||
|
|
||||||
ax2.set_ylim([0, einwohner_deutschland * percentage])
|
ax2.set_ylim([0, einwohner_deutschland * percentage])
|
||||||
ax2.set_xlim(xmax=dates[0] + datetime.timedelta(days=percentage * days_extrapolated))
|
ax2.set_xlim(xmax=dates[0] + datetime.timedelta(days=percentage * days_extrapolated))
|
||||||
|
|
Loading…
Reference in a new issue