diff --git a/src/View/Results/PlotAC.py b/src/View/Results/PlotAC.py index d3b9eb26..8531c4ad 100644 --- a/src/View/Results/PlotAC.py +++ b/src/View/Results/PlotAC.py @@ -149,8 +149,17 @@ class PlotAC(PamhyrPlot): self.annotation = [] self.cgl, self.igl = reach.geometry.compute_guidelines() - lcomplete = list(self.cgl) - lincomplete = list(self.igl) + # we make sure that the lines are in the left-to-right order + lcomplete = [ + x.name + for x in profile.geometry.named_points() + if x.name in self.cgl + ] + lincomplete = [ + x.name + for x in profile.geometry.named_points() + if x.name in self.igl + ] self.color_complete_gl = self.colors self.color_incomplete_gl = 2 * ["grey"] @@ -170,7 +179,7 @@ class PlotAC(PamhyrPlot): ] else: color = self.color_incomplete_gl[ - lincomplete.index(txt) + lincomplete.index(txt) % len(self.color_incomplete_gl) ] annotation = self.canvas.axes.annotate(