From 6c9657af66436602b5fe1001858cbfd6ed5848da Mon Sep 17 00:00:00 2001 From: Pierre-Antoine Rouby <pierre-antoine.rouby@inrae.fr> Date: Wed, 7 Jun 2023 15:10:38 +0200 Subject: [PATCH] Sections: Plot: Minor change. --- src/View/Sections/PlotStricklers.py | 20 +++++++++----------- src/View/Sections/Window.py | 2 ++ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/View/Sections/PlotStricklers.py b/src/View/Sections/PlotStricklers.py index 5069087b..cdd77303 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 514cfe27..5690b472 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): -- GitLab