diff --git a/src/View/Sections/PlotStricklers.py b/src/View/Sections/PlotStricklers.py index 5069087b17fa58d287a91fb640eb9677f3e2c9cb..cdd7730398243b5289b89d52d56e95d50c13597d 100644 --- a/src/View/Sections/PlotStricklers.py +++ b/src/View/Sections/PlotStricklers.py @@ -58,11 +58,11 @@ class PlotStricklers(APlot): return self.canvas.axes.set_ylabel( - _translate("MainWindow_reach", "Stricklers (m)"), + _translate("MainWindow_reach", "Stricklers"), color='green', fontsize=11 ) self.canvas.axes.set_xlabel( - _translate("MainWindow_reach", "KP (m)"), + _translate("MainWindow_reach", "Kp (m)"), color='green', fontsize=11 ) @@ -77,20 +77,18 @@ class PlotStricklers(APlot): self.draw_sections(lst) # HightLight - kp_min, kp_max = (-1, -1) if highlight is not None: kp_min, kp_max = highlight - lst = list( - filter( - lambda s: (s.begin_kp == kp_min and - s.end_kp == kp_max), - sections.sections + lst = list( + filter( + lambda s: (s.begin_kp == kp_min and + s.end_kp == kp_max), + sections.sections + ) ) - ) - self.draw_sections(lst, color="b") - + self.draw_sections(lst, color="b") self.canvas.figure.tight_layout() self.canvas.figure.canvas.draw_idle() diff --git a/src/View/Sections/Window.py b/src/View/Sections/Window.py index 514cfe273f79d8ba096ba0cb9865b05d0d79c4db..5690b4729ab0575b0dc81d8db0b5beae40a917e4 100644 --- a/src/View/Sections/Window.py +++ b/src/View/Sections/Window.py @@ -114,6 +114,7 @@ class SectionsWindow(ASubMainWindow, ListedSubWindow): toolbar = None, display_current = False ) + self.plot.draw() self.canvas_2 = MplCanvas(width=5, height=4, dpi=100) self.canvas_2.setObjectName("canvas_2") @@ -125,6 +126,7 @@ class SectionsWindow(ASubMainWindow, ListedSubWindow): data = self._reach, toolbar = None ) + self.plot_2.draw() def setup_connections(self):