Sections: Plot: Minor change.

mesh
Pierre-Antoine Rouby 2023-06-07 15:10:38 +02:00
parent 3a2baebcde
commit 6c9657af66
2 changed files with 11 additions and 11 deletions

View File

@ -58,11 +58,11 @@ class PlotStricklers(APlot):
return return
self.canvas.axes.set_ylabel( self.canvas.axes.set_ylabel(
_translate("MainWindow_reach", "Stricklers (m)"), _translate("MainWindow_reach", "Stricklers"),
color='green', fontsize=11 color='green', fontsize=11
) )
self.canvas.axes.set_xlabel( self.canvas.axes.set_xlabel(
_translate("MainWindow_reach", "KP (m)"), _translate("MainWindow_reach", "Kp (m)"),
color='green', fontsize=11 color='green', fontsize=11
) )
@ -77,7 +77,6 @@ class PlotStricklers(APlot):
self.draw_sections(lst) self.draw_sections(lst)
# HightLight # HightLight
kp_min, kp_max = (-1, -1) kp_min, kp_max = (-1, -1)
if highlight is not None: if highlight is not None:
kp_min, kp_max = highlight kp_min, kp_max = highlight
@ -91,7 +90,6 @@ class PlotStricklers(APlot):
) )
self.draw_sections(lst, color="b") self.draw_sections(lst, color="b")
self.canvas.figure.tight_layout() self.canvas.figure.tight_layout()
self.canvas.figure.canvas.draw_idle() self.canvas.figure.canvas.draw_idle()
if self.toolbar is not None: if self.toolbar is not None:

View File

@ -114,6 +114,7 @@ class SectionsWindow(ASubMainWindow, ListedSubWindow):
toolbar = None, toolbar = None,
display_current = False display_current = False
) )
self.plot.draw()
self.canvas_2 = MplCanvas(width=5, height=4, dpi=100) self.canvas_2 = MplCanvas(width=5, height=4, dpi=100)
self.canvas_2.setObjectName("canvas_2") self.canvas_2.setObjectName("canvas_2")
@ -125,6 +126,7 @@ class SectionsWindow(ASubMainWindow, ListedSubWindow):
data = self._reach, data = self._reach,
toolbar = None toolbar = None
) )
self.plot_2.draw()
def setup_connections(self): def setup_connections(self):