Geometry: Fix display with more than 10 guidelines.

setup.py
Pierre-Antoine Rouby 2024-05-03 14:56:11 +02:00
parent ba81f923d9
commit 0e75d67671
4 changed files with 7 additions and 3 deletions

View File

@ -129,7 +129,7 @@ class PlotAC(PamhyrPlot):
if txt.strip() in self.complete_gl:
color = self.color_complete_gl[
lcomplete.index(txt)
lcomplete.index(txt) % len(self.color_complete_gl)
]
else:
color = self.color_incomplete_gl[

View File

@ -167,7 +167,9 @@ class PlotKPZ(PamhyrPlot):
self.line_kp_zgl.append(
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

View File

@ -98,7 +98,8 @@ class PlotXY(PamhyrPlot):
self.line_gl = []
for x, y in zip(x_complete, y_complete):
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)
ind += 1

View File

@ -40,6 +40,7 @@ class PamhyrPlot(APlot):
color_plot_river_water_zone = "skyblue"
colors = list(mplcolors.TABLEAU_COLORS)
linestyle = ['solid', 'dotted', 'dashed', 'dashdot']
plot_default_kargs = {
"lw": 1.,