Commit 39411b0c authored by Samuël Weber's avatar Samuël Weber
Browse files

fix row layout contribution

parent c6795f49
...@@ -1454,8 +1454,8 @@ def update_op_contribution_graph(stations, species, plot_type): ...@@ -1454,8 +1454,8 @@ def update_op_contribution_graph(stations, species, plot_type):
category_orders={"estimator": ["50%", "mean"]}, category_orders={"estimator": ["50%", "mean"]},
height=1000 height=1000
) )
fig.update_yaxes(title_text="Median value<br>OP {} (nmol.min⁻¹.m⁻³)".format(species[0]), row=1) fig.update_yaxes(title_text="Median value<br>OP {} (nmol.min⁻¹.m⁻³)".format(species[0]), row=2, col=1)
fig.update_yaxes(title_text="Mean value<br>OP {} (nmol.min⁻¹.m⁻³)".format(species[0]), row=2) fig.update_yaxes(title_text="Mean value<br>OP {} (nmol.min⁻¹.m⁻³)".format(species[0]), row=1, col=1)
elif plot_type == "seasonal": elif plot_type == "seasonal":
data = contrib.groupby(["season", "factor"])\ data = contrib.groupby(["season", "factor"])\
.describe()["OP"][["mean", "50%"]]\ .describe()["OP"][["mean", "50%"]]\
...@@ -1467,11 +1467,11 @@ def update_op_contribution_graph(stations, species, plot_type): ...@@ -1467,11 +1467,11 @@ def update_op_contribution_graph(stations, species, plot_type):
color_discrete_map=colors, color_discrete_map=colors,
barmode="group", barmode="group",
facet_row="estimator", facet_row="estimator",
category_orders={"season": ["Winter", "Spring", "Summer", "Fall"]}, category_orders={"estimator": ["50%", "mean"], "season": ["Winter", "Spring", "Summer", "Fall"]},
height=1000, #*len(stations), height=1000, #*len(stations),
) )
fig.update_yaxes(title_text="Median value<br>OP {} (nmol.min⁻¹.m⁻³)".format(species[0]), row=1) fig.update_yaxes(title_text="Median value<br>OP {} (nmol.min⁻¹.m⁻³)".format(species[0]), row=2)
fig.update_yaxes(title_text="Mean value<br>OP {} (nmol.min⁻¹.m⁻³)".format(species[0]), row=2) fig.update_yaxes(title_text="Mean value<br>OP {} (nmol.min⁻¹.m⁻³)".format(species[0]), row=1)
elif plot_type == "ts": elif plot_type == "ts":
fig = px.area( fig = px.area(
contrib, x="Date", y="OP", color="factor", contrib, x="Date", y="OP", color="factor",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment