Draw vlines first

This commit is contained in:
Felix Blanke 2023-09-07 12:37:25 +02:00
parent d2d157c479
commit 9b17bafb97

View File

@ -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