mirror of https://gitlab.com/pamhyr/pamhyr2
pep8
parent
0753c4e1b7
commit
fc5de2a097
|
|
@ -66,8 +66,7 @@ class Plot(PamhyrPlot):
|
||||||
self._isometric_axis = False
|
self._isometric_axis = False
|
||||||
|
|
||||||
self.hl_points = []
|
self.hl_points = []
|
||||||
self.highlight = None # Hydrolic values (z, wet_area,
|
self.highlight = None # (z, wet_area, wet_preimeter, water_width)
|
||||||
# wet_preimeter, water_width)
|
|
||||||
self._colors = []
|
self._colors = []
|
||||||
|
|
||||||
self._onpickevent = None
|
self._onpickevent = None
|
||||||
|
|
@ -133,7 +132,6 @@ class Plot(PamhyrPlot):
|
||||||
z = self._get_z_from_click(event)
|
z = self._get_z_from_click(event)
|
||||||
if z < self.data.z_min() or event.button.value == 2:
|
if z < self.data.z_min() or event.button.value == 2:
|
||||||
self.highlight = None
|
self.highlight = None
|
||||||
#self.update()
|
|
||||||
self.draw_highligth()
|
self.draw_highligth()
|
||||||
self.update_idle()
|
self.update_idle()
|
||||||
return
|
return
|
||||||
|
|
@ -144,27 +142,13 @@ class Plot(PamhyrPlot):
|
||||||
|
|
||||||
self.highlight = (z, a, p, w)
|
self.highlight = (z, a, p, w)
|
||||||
|
|
||||||
#self.update()
|
|
||||||
self.draw_highligth()
|
self.draw_highligth()
|
||||||
self.update_idle()
|
self.update_idle()
|
||||||
return
|
return
|
||||||
|
|
||||||
def select_points_from_indices(self, indices):
|
def select_points_from_indices(self, indices):
|
||||||
#data = self.data
|
self.draw_highligth()
|
||||||
#_, hyd = self.highlight
|
# self.update()
|
||||||
|
|
||||||
#points = list(
|
|
||||||
#map(
|
|
||||||
#lambda e: e[1],
|
|
||||||
#filter(
|
|
||||||
#lambda e: e[0] in indices,
|
|
||||||
#enumerate(
|
|
||||||
#zip(data.get_station(), data.z())
|
|
||||||
#)
|
|
||||||
#)
|
|
||||||
#)
|
|
||||||
#)
|
|
||||||
self.update()
|
|
||||||
|
|
||||||
def _select_in_table(self, ind):
|
def _select_in_table(self, ind):
|
||||||
if self._table is not None:
|
if self._table is not None:
|
||||||
|
|
@ -212,11 +196,6 @@ class Plot(PamhyrPlot):
|
||||||
|
|
||||||
x = event.artist.get_xdata()
|
x = event.artist.get_xdata()
|
||||||
y = event.artist.get_ydata()
|
y = event.artist.get_ydata()
|
||||||
|
|
||||||
# points = filter(
|
|
||||||
# lambda e: e[0] in points_ind,
|
|
||||||
# enumerate(zip(x, y))
|
|
||||||
# )
|
|
||||||
points = enumerate(zip(x, y))
|
points = enumerate(zip(x, y))
|
||||||
|
|
||||||
mx = event.mouseevent.xdata
|
mx = event.mouseevent.xdata
|
||||||
|
|
@ -377,6 +356,7 @@ class Plot(PamhyrPlot):
|
||||||
self._z_note.set_visible(False)
|
self._z_note.set_visible(False)
|
||||||
self._z_line.set_visible(False)
|
self._z_line.set_visible(False)
|
||||||
self._z_fill_between.set_visible(False)
|
self._z_fill_between.set_visible(False)
|
||||||
|
self.idle()
|
||||||
|
|
||||||
def draw_highligth_z_line(self, z, a, p, w):
|
def draw_highligth_z_line(self, z, a, p, w):
|
||||||
text = (
|
text = (
|
||||||
|
|
@ -395,8 +375,6 @@ class Plot(PamhyrPlot):
|
||||||
)
|
)
|
||||||
y = self.data.z()
|
y = self.data.z()
|
||||||
|
|
||||||
if 1 == 1:
|
|
||||||
#if self._z_note is None:
|
|
||||||
if self._z_note is not None:
|
if self._z_note is not None:
|
||||||
self._z_note.remove()
|
self._z_note.remove()
|
||||||
if self._z_line is not None:
|
if self._z_line is not None:
|
||||||
|
|
@ -421,16 +399,6 @@ class Plot(PamhyrPlot):
|
||||||
alpha=0.7
|
alpha=0.7
|
||||||
)
|
)
|
||||||
self._z_note.set_visible(True)
|
self._z_note.set_visible(True)
|
||||||
#else:
|
|
||||||
#self.draw_highligth_z_line_fill(x, y, z)
|
|
||||||
|
|
||||||
#self._z_line.set_data(xlim, [z, z])
|
|
||||||
#self._z_note.set_position(pos)
|
|
||||||
#self._z_note.set_text(text)
|
|
||||||
#self._z_line.set_visible(True)
|
|
||||||
#self._z_note.set_visible(True)
|
|
||||||
#self._z_fill_between.set_visible(True)
|
|
||||||
#self.update_idle()
|
|
||||||
|
|
||||||
def draw_highligth_z_line_fill(self, x, y, z):
|
def draw_highligth_z_line_fill(self, x, y, z):
|
||||||
if self._z_fill_between is not None:
|
if self._z_fill_between is not None:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue