From 9b17bafb978fbc9154229887dd96fb844326d4ea Mon Sep 17 00:00:00 2001 From: Felix Blanke Date: Thu, 7 Sep 2023 12:37:25 +0200 Subject: [PATCH] Draw vlines first --- wsgi.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wsgi.py b/wsgi.py index 40677aa..4940857 100644 --- a/wsgi.py +++ b/wsgi.py @@ -114,6 +114,10 @@ def plot( ) -> str: fig = plt.figure(dpi=300) + if fix_lims: + for total_target in total_targets: + plt.axhline(y=total_target, color="#48a9be", linestyle="--") + for bez in landesbez_str: series = df.sum(axis=1) if bez is None else df[bez] plot_df = series.to_frame("Digitale Befragung").replace(0, np.nan) @@ -193,10 +197,6 @@ def plot( sec_ax.set_ylabel("# Teilnahmen [% Erfolg]") sec_ax.yaxis.set_major_formatter(mtick.PercentFormatter()) - if fix_lims: - for total_target in total_targets: - plt.axhline(y=total_target, color="#48a9be", linestyle="--") - xlim = plt.xlim() # fill weekends