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

Results: Plot: Fix display whene more than 10 sl.

No related merge requests found
Pipeline #55191 passed with stages
in 3 minutes and 23 seconds
Showing with 6 additions and 3 deletions
+6 -3
...@@ -119,11 +119,14 @@ class PlotKPC(PamhyrPlot): ...@@ -119,11 +119,14 @@ class PlotKPC(PamhyrPlot):
self.line_kp_sl.append(None) self.line_kp_sl.append(None)
self.line_kp_sl[i], = self.canvas.axes.plot( self.line_kp_sl[i], = self.canvas.axes.plot(
kp, z, kp, z,
linestyle="solid" if i == len(final_z_sl) - 1 else "--", linestyle=(
"solid" if i == len(final_z_sl) - 1
else self.linestyle[1:][i // len(self.colors)]
),
lw=1., lw=1.,
color=( color=(
self.color_plot_river_bottom if i == len(final_z_sl) - 1 self.color_plot_river_bottom if i == len(final_z_sl) - 1
else self.colors[i] else self.colors[i % len(self.colors)]
) )
) )
......
...@@ -40,7 +40,7 @@ class PamhyrPlot(APlot): ...@@ -40,7 +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'] linestyle = ['solid', 'dashed', 'dashdot', 'dotted']
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