diff --git a/src/View/InitialConditions/translate.py b/src/View/InitialConditions/translate.py index d3cef4c188ac603474d8aafe00e2180c1d7562b8..46d5f4040f3b3f44efad35d6aecd8cdf1a809572 100644 --- a/src/View/InitialConditions/translate.py +++ b/src/View/InitialConditions/translate.py @@ -41,9 +41,9 @@ class ICTranslate(MainTranslate): self._sub_dict["table_headers"] = { # "name": _translate("InitialCondition", "Name"), "kp": self._dict["unit_kp"], - "speed": self._dict["unit_speed"], "discharge": self._dict["unit_discharge"], "elevation": self._dict["unit_elevation"], "height": self._dict["unit_height"], + "speed": self._dict["unit_speed"], # "comment": _translate("InitialCondition", "Comment"), } diff --git a/src/View/Results/PlotH.py b/src/View/Results/PlotH.py index 5dacb2a88536b8f80fd1d9abff893b64f5b53a3d..2ac499e4a00e5abb88467142ddb6859e68a0de76 100644 --- a/src/View/Results/PlotH.py +++ b/src/View/Results/PlotH.py @@ -112,16 +112,22 @@ class PlotH(PamhyrPlot): ) def draw_current(self, reach, profile): - y = profile.get_key("Q") + min_y, max_y = reduce( + lambda acc, p: ( + acc[0] + [min(p.get_key("Q"))], + acc[1] + [max(p.get_key("Q"))] + ), + reach.profiles, + ([], []) + ) - kargs = self.plot_default_kargs.copy() - kargs["marker"] = "o" self._current, = self.canvas.axes.plot( - self._current_timestamp, - y[self.ts.index(self._current_timestamp)], + [self._current_timestamp, self._current_timestamp], + [min(min_y), max(max_y)], # label=self.label_timestamp, - color=self.color_plot_current, - **kargs + color=self.color_plot_river_bottom, + linestyle="dashed", + lw=1., ) def draw_max(self, reach): @@ -175,7 +181,8 @@ class PlotH(PamhyrPlot): self._line.set_data(x, y) + _, min_max = self._current.get_data() self._current.set_data( self._current_timestamp, - y[self.ts.index(self._current_timestamp)] + min_max )