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