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

Results: CustomPlot: Fix pep8.

Showing with 6 additions and 8 deletions
+6 -8
...@@ -86,7 +86,6 @@ class CustomPlot(PamhyrPlot): ...@@ -86,7 +86,6 @@ class CustomPlot(PamhyrPlot):
if "0-meter" in self._y_axes and "1-m3s" in self._y_axes: if "0-meter" in self._y_axes and "1-m3s" in self._y_axes:
m3s_axes = self._axes["1-m3s"] m3s_axes = self._axes["1-m3s"]
lines = {} lines = {}
if "elevation" in self._y: if "elevation" in self._y:
meter_axes.set_ylim( meter_axes.set_ylim(
...@@ -147,11 +146,11 @@ class CustomPlot(PamhyrPlot): ...@@ -147,11 +146,11 @@ class CustomPlot(PamhyrPlot):
# Legend # Legend
lns = reduce( lns = reduce(
lambda acc, l: acc + l, lambda acc, line: acc + line,
map(lambda l: lines[l], lines), map(lambda line: lines[line], lines),
[] []
) )
labs = list(map(lambda l: self._trad[l], lines)) labs = list(map(lambda line: self._trad[line], lines))
self.canvas.axes.legend(lns, labs, loc="lower left") self.canvas.axes.legend(lns, labs, loc="lower left")
def _customize_x_axes_time(self, ts, mode="time"): def _customize_x_axes_time(self, ts, mode="time"):
...@@ -272,16 +271,15 @@ class CustomPlot(PamhyrPlot): ...@@ -272,16 +271,15 @@ class CustomPlot(PamhyrPlot):
) )
lines["discharge"] = line lines["discharge"] = line
self._customize_x_axes_time(ts) self._customize_x_axes_time(ts)
# Legend # Legend
lns = reduce( lns = reduce(
lambda acc, l: acc + l, lambda acc, line: acc + line,
map(lambda l: lines[l], lines), map(lambda line: lines[line], lines),
[] []
) )
labs = list(map(lambda l: self._trad[l], lines)) labs = list(map(lambda line: self._trad[line], lines))
self.canvas.axes.legend(lns, labs, loc="lower left") self.canvas.axes.legend(lns, labs, loc="lower left")
@timer @timer
......
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