From 706cbe96693cbabcfd8bb2d2e8a3a2d843d9d248 Mon Sep 17 00:00:00 2001 From: Benedikt Bastin Date: Sat, 16 Jan 2021 14:38:18 +0100 Subject: [PATCH] feat: Plot mean vacciantion rates history --- plot.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plot.py b/plot.py index 329d7f7..ae1a409 100644 --- a/plot.py +++ b/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) - +mean_vaccinations_daily_up_to_date = np.round(cumulative / range(1, len(cumulative) + 1)) # Stand aus Daten auslesen #stand = dates.iloc[-1] @@ -103,7 +103,8 @@ def plot_extrapolation_portion(percentage): 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_xlim(xmax=dates[0] + datetime.timedelta(days=percentage * days_extrapolated))