Do not plot lines if no datapoint in set
This commit is contained in:
parent
11a4cf4248
commit
45647def39
3
wsgi.py
3
wsgi.py
@ -112,8 +112,7 @@ def plot(
|
|||||||
series = df.sum(axis=1) if landesbez_str is None else df[landesbez_str]
|
series = df.sum(axis=1) if landesbez_str is None else df[landesbez_str]
|
||||||
plot_df = series.to_frame("Digitale Befragung").replace(0, np.nan)
|
plot_df = series.to_frame("Digitale Befragung").replace(0, np.nan)
|
||||||
plot_df = plot_df.astype({"Digitale Befragung": "float32"})
|
plot_df = plot_df.astype({"Digitale Befragung": "float32"})
|
||||||
if pd.isna(plot_df).all().item():
|
if not pd.isna(plot_df).all().item():
|
||||||
continue
|
|
||||||
if alpha is not None:
|
if alpha is not None:
|
||||||
plt.fill_between(
|
plt.fill_between(
|
||||||
plot_df.dropna().index,
|
plot_df.dropna().index,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user