diff --git a/src/View/Results/PlotHEnsemble.py b/src/View/Results/PlotHEnsemble.py index 40b37e80..3a23b678 100644 --- a/src/View/Results/PlotHEnsemble.py +++ b/src/View/Results/PlotHEnsemble.py @@ -102,6 +102,7 @@ class PlotHEnsemble(PamhyrPlot): return self.draw_data(res_id) + self.draw_data_std_derivation(res_id) self.canvas.axes.set_xlabel( self._trad["unit_time_s"], @@ -159,6 +160,29 @@ class PlotHEnsemble(PamhyrPlot): self._line.append(line) + @timer + def draw_data_std_derivation(self, res_id): + results = self.results[res_id] + reach = results.river.reach(self._current_reach_id) + + q = results.get("table")["q_mean"] + std_deriv = results.get("table")["q_std_derivation"] + profile = reach.profile(self._current_profile_id[0]) + + x = self._timestamps + y = q[:, profile.global_index] + std = std_deriv[:, profile.global_index] + + y_b = y - std + y_t = y + std + + plot = self.canvas.axes.fill_between( + x, y_b, y_t, + label=f"Standard derivation {profile.name}", + color=self.color_plot_ensemble_std_deriv, + alpha=0.3, + ) + def draw_additional_data(self, res_id): results = self.results[res_id]