mirror of https://gitlab.com/pamhyr/pamhyr2
Results: PlotRKC: Minor change to optimize drawing.
parent
97fe038d9b
commit
a0886d900e
|
|
@ -109,12 +109,8 @@ class PlotRKC(PamhyrPlot):
|
|||
table = results.get("table")["zfd"]
|
||||
ts = results.get_timestamp_id(self._current_timestamp)
|
||||
|
||||
zfd = list(
|
||||
map(
|
||||
lambda p: table[ts, p.global_index],
|
||||
reach.profiles
|
||||
)
|
||||
)
|
||||
gi_0, gi_1 = reach.global_index
|
||||
water_z = table[ts, gi_0 : gi_1 + 1]
|
||||
|
||||
self.line_bottom, = self.canvas.axes.plot(
|
||||
rk, zfd,
|
||||
|
|
@ -178,14 +174,8 @@ class PlotRKC(PamhyrPlot):
|
|||
table = result.get("table")["Z"]
|
||||
ts = result.get_timestamp_id(self._current_timestamp)
|
||||
|
||||
water_z = list(
|
||||
map(
|
||||
lambda p: table[
|
||||
ts, p.global_index
|
||||
],
|
||||
reach.profiles
|
||||
)
|
||||
)
|
||||
gi_0, gi_1 = reach.global_index
|
||||
water_z = table[ts, gi_0 : gi_1 + 1]
|
||||
|
||||
self.water = self.canvas.axes.plot(
|
||||
rk, water_z,
|
||||
|
|
@ -209,16 +199,8 @@ class PlotRKC(PamhyrPlot):
|
|||
table = result.get("table")["Z"]
|
||||
ts = result.get_timestamp_id(self._current_timestamp)
|
||||
|
||||
water_z = list(
|
||||
map(
|
||||
lambda p: np.max(
|
||||
table[
|
||||
:, p.global_index
|
||||
]
|
||||
),
|
||||
reach.profiles
|
||||
)
|
||||
)
|
||||
gi_0, gi_1 = reach.global_index
|
||||
water_z = table[ts, gi_0 : gi_1 + 1]
|
||||
|
||||
self.canvas.axes.plot(
|
||||
rk, water_z, lw=1.,
|
||||
|
|
@ -354,14 +336,8 @@ class PlotRKC(PamhyrPlot):
|
|||
table = result.get("table")["Z"]
|
||||
ts = result.get_timestamp_id(self._current_timestamp)
|
||||
|
||||
water_z = list(
|
||||
map(
|
||||
lambda p: table[
|
||||
ts, p.global_index
|
||||
],
|
||||
reach.profiles
|
||||
)
|
||||
)
|
||||
gi_0, gi_1 = reach.global_index
|
||||
water_z = table[ts, gi_0 : gi_1 + 1]
|
||||
|
||||
self.water[0].set_data(
|
||||
rk, water_z
|
||||
|
|
@ -402,10 +378,7 @@ class PlotRKC(PamhyrPlot):
|
|||
table = results.get("table")["zfd"]
|
||||
ts = results.get_timestamp_id(self._current_timestamp)
|
||||
|
||||
zfd = list(map(
|
||||
lambda p: table[ts, p.global_index],
|
||||
reach.profiles
|
||||
))
|
||||
zfd = table[ts, reach.global_index]
|
||||
|
||||
self.line_bottom.remove()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue