Commit 0e75d676 authored by Pierre-Antoine Rouby's avatar Pierre-Antoine Rouby
Browse files

Geometry: Fix display with more than 10 guidelines.

Showing with 7 additions and 3 deletions
+7 -3
...@@ -129,7 +129,7 @@ class PlotAC(PamhyrPlot): ...@@ -129,7 +129,7 @@ class PlotAC(PamhyrPlot):
if txt.strip() in self.complete_gl: if txt.strip() in self.complete_gl:
color = self.color_complete_gl[ color = self.color_complete_gl[
lcomplete.index(txt) lcomplete.index(txt) % len(self.color_complete_gl)
] ]
else: else:
color = self.color_incomplete_gl[ color = self.color_incomplete_gl[
......
...@@ -167,7 +167,9 @@ class PlotKPZ(PamhyrPlot): ...@@ -167,7 +167,9 @@ class PlotKPZ(PamhyrPlot):
self.line_kp_zgl.append( self.line_kp_zgl.append(
self.canvas.axes.plot( self.canvas.axes.plot(
kp, z, lw=1., color=self.colors[ind] kp, z, lw=1.,
color=self.colors[ind % len(self.colors)],
linestyle=self.linestyle[ind // len(self.colors)]
) )
) )
ind += 1 ind += 1
......
...@@ -98,7 +98,8 @@ class PlotXY(PamhyrPlot): ...@@ -98,7 +98,8 @@ class PlotXY(PamhyrPlot):
self.line_gl = [] self.line_gl = []
for x, y in zip(x_complete, y_complete): for x, y in zip(x_complete, y_complete):
line = self.canvas.axes.plot( line = self.canvas.axes.plot(
x, y, color=self.colors[ind] x, y, color=self.colors[ind % len(self.colors)],
linestyle=self.linestyle[ind // len(self.colors)]
) )
self.line_gl.append(line) self.line_gl.append(line)
ind += 1 ind += 1
......
...@@ -40,6 +40,7 @@ class PamhyrPlot(APlot): ...@@ -40,6 +40,7 @@ class PamhyrPlot(APlot):
color_plot_river_water_zone = "skyblue" color_plot_river_water_zone = "skyblue"
colors = list(mplcolors.TABLEAU_COLORS) colors = list(mplcolors.TABLEAU_COLORS)
linestyle = ['solid', 'dotted', 'dashed', 'dashdot']
plot_default_kargs = { plot_default_kargs = {
"lw": 1., "lw": 1.,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment