mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Translate: Rename KP to RK (River Kilometric).
This commit is contained in:
1 parent
b83494888b
commit
46dc527222
66 files changed
+668
-614
No files matched your search
@@ -41,10 +41,10 @@ class PlotStricklers(PamhyrPlot):
|
||||
parent=parent
|
||||
)
|
||||
|
||||
self.label_x = self._trad["kp"]
|
||||
self.label_x = self._trad["rk"]
|
||||
self.label_y = self._trad["strickler_plot"]
|
||||
|
||||
self.line_kp_elevation = [None, None]
|
||||
self.line_rk_elevation = [None, None]
|
||||
|
||||
self._isometric_axis = False
|
||||
|
||||
@@ -65,9 +65,9 @@ class PlotStricklers(PamhyrPlot):
|
||||
self._init = True
|
||||
|
||||
def draw_data(self):
|
||||
kp = self.data.reach.get_kp()
|
||||
rk = self.data.reach.get_rk()
|
||||
self.canvas.axes.set_xlim(
|
||||
left=min(kp), right=max(kp)
|
||||
left=min(rk), right=max(rk)
|
||||
)
|
||||
|
||||
frictions = self.data.frictions
|
||||
@@ -76,14 +76,14 @@ class PlotStricklers(PamhyrPlot):
|
||||
self.draw_frictions(lst, self.color_plot)
|
||||
|
||||
# HightLight
|
||||
kp_min, kp_max = (-1, -1)
|
||||
rk_min, rk_max = (-1, -1)
|
||||
if self._highlight_data is not None:
|
||||
kp_min, kp_max = self._highlight_data
|
||||
rk_min, rk_max = self._highlight_data
|
||||
|
||||
lst = list(
|
||||
filter(
|
||||
lambda s: (s.begin_kp == kp_min and
|
||||
s.end_kp == kp_max),
|
||||
lambda s: (s.begin_rk == rk_min and
|
||||
s.end_rk == rk_max),
|
||||
frictions.frictions
|
||||
)
|
||||
)
|
||||
@@ -96,7 +96,7 @@ class PlotStricklers(PamhyrPlot):
|
||||
lambda f: f.is_full_defined(),
|
||||
frictions
|
||||
),
|
||||
key=lambda s: s.begin_kp
|
||||
key=lambda s: s.begin_rk
|
||||
)
|
||||
|
||||
coef = flatten(
|
||||
@@ -106,9 +106,9 @@ class PlotStricklers(PamhyrPlot):
|
||||
)
|
||||
)
|
||||
|
||||
kp = flatten(
|
||||
rk = flatten(
|
||||
map(
|
||||
lambda s: [s.begin_kp, s.end_kp],
|
||||
lambda s: [s.begin_rk, s.end_rk],
|
||||
lst
|
||||
)
|
||||
)
|
||||
@@ -116,13 +116,13 @@ class PlotStricklers(PamhyrPlot):
|
||||
coef_minor = list(map(lambda s: s.minor, coef))
|
||||
coef_medium = list(map(lambda s: s.medium, coef))
|
||||
|
||||
self.line_kp_elevation[0] = self.canvas.axes.plot(
|
||||
kp, coef_minor,
|
||||
self.line_rk_elevation[0] = self.canvas.axes.plot(
|
||||
rk, coef_minor,
|
||||
color=color, lw=1.
|
||||
)
|
||||
|
||||
self.line_kp_elevation[1] = self.canvas.axes.plot(
|
||||
kp, coef_medium,
|
||||
self.line_rk_elevation[1] = self.canvas.axes.plot(
|
||||
rk, coef_medium,
|
||||
color=color, lw=1.
|
||||
)
|
||||
|
||||
|
||||
Reference in new issue
Block a user