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

SL: Plots reverse draw order.

Showing with 11 additions and 11 deletions
+11 -11
......@@ -73,16 +73,16 @@ class Plot(APlot):
[z]
)
for i, zsl in enumerate(z_sl):
for i, zsl in enumerate(reversed(z_sl)):
self.line_kp_sl.append(None)
self.line_kp_sl[i], = self.canvas.axes.plot(
x, zsl,
label=names[i],
linestyle="solid" if i == 0 else "--",
label=names[-(i+1)],
linestyle="solid" if i == len(names) - 1 else "--",
lw=1.8,
color='grey' if i == 0 else None
color='grey' if i == len(names) - 1 else None
)
self.canvas.axes.text(x[0] + 0.01, zsl[0] + 0.01, f'{names[i]}')
self.canvas.axes.text(x[0] + 0.01, zsl[0] + 0.01, f'{names[-(i+1)]}')
self.canvas.figure.tight_layout()
self.canvas.figure.canvas.draw_idle()
......
......@@ -69,13 +69,13 @@ class Plot(APlot):
[z_min]
)
for i, z in enumerate(z_sl):
for i, z in enumerate(reversed(z_sl)):
self.line_kp_sl.append(None)
self.line_kp_sl[i], = self.canvas.axes.plot(
kp, z,
linestyle="solid" if i == 0 else "--",
linestyle="solid" if i == len(z_sl) - 1 else "--",
lw=1.8,
color='grey' if i == 0 else None
color='grey' if i == len(z_sl) - 1 else None
)
self.canvas.figure.tight_layout()
......
......@@ -68,13 +68,13 @@ class Plot(APlot):
[z]
)
for i, zsl in enumerate(z_sl):
for i, zsl in enumerate(reversed(z_sl)):
self.line_kp_sl.append(None)
self.line_kp_sl[i], = self.canvas.axes.plot(
x, zsl,
linestyle="solid" if i == 0 else "--",
linestyle="solid" if i == len(z_sl) - 1 else "--",
lw=1.8,
color='grey' if i == 0 else None
color='grey' if i == len(z_sl) - 1 else None
)
self.canvas.figure.tight_layout()
......
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