mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
pep8
This commit is contained in:
1 parent
59fc80a10b
commit
7d4091eb24
6 files changed
+207
-187
No files matched your search
@@ -51,16 +51,16 @@ class PlotXY(PamhyrPlot):
|
||||
self.before_plot_selected = None
|
||||
self.plot_selected = None
|
||||
self.after_plot_selected = None
|
||||
self.parent=parent
|
||||
self.parent = parent
|
||||
self.line_xy_collection = None
|
||||
self._table=table
|
||||
self._table = table
|
||||
self._colors = []
|
||||
self._style = []
|
||||
|
||||
def onpick(self, event):
|
||||
if event.mouseevent.inaxes != self.canvas.axes:
|
||||
return
|
||||
if event.mouseevent.button.value not in [1,3]:
|
||||
if event.mouseevent.button.value not in [1, 3]:
|
||||
return
|
||||
|
||||
closest = self._closest_section(event)
|
||||
@@ -75,7 +75,6 @@ class PlotXY(PamhyrPlot):
|
||||
if event.mouseevent.button.value == 3:
|
||||
table.setData(index[4], kp[closest[0]])
|
||||
|
||||
#self.update()
|
||||
return
|
||||
|
||||
def _closest_section(self, event):
|
||||
@@ -90,7 +89,7 @@ class PlotXY(PamhyrPlot):
|
||||
|
||||
points = []
|
||||
for i in ind:
|
||||
points = points + [[i, j] for j in segments[i]]
|
||||
points = points + [[i, j] for j in segments[i]]
|
||||
|
||||
def dist_mouse(point):
|
||||
x, y = point[1]
|
||||
@@ -129,10 +128,12 @@ class PlotXY(PamhyrPlot):
|
||||
self.line_xy.append(np.column_stack(xy))
|
||||
|
||||
self._colors, self._style = self.color_hightlight()
|
||||
self.line_xy_collection = collections.LineCollection(self.line_xy,
|
||||
colors = self._colors,
|
||||
linestyle = self._style,
|
||||
picker=10)
|
||||
self.line_xy_collection = collections.LineCollection(
|
||||
self.line_xy,
|
||||
colors=self._colors,
|
||||
linestyle=self._style,
|
||||
picker=10
|
||||
)
|
||||
self.canvas.axes.add_collection(self.line_xy_collection)
|
||||
|
||||
def color_hightlight(self):
|
||||
@@ -213,24 +214,24 @@ class PlotXY(PamhyrPlot):
|
||||
x_complete = list(self.data.get_guidelines_x())
|
||||
y_complete = list(self.data.get_guidelines_y())
|
||||
|
||||
# TODO comprendre à quoi sert ce bout de code
|
||||
# ========>
|
||||
#for i in range(self.data.number_profiles):
|
||||
#if i < len(self.line_xy):
|
||||
#self.line_xy[i][0].set_data(
|
||||
#self.data.profile(i).x(),
|
||||
#self.data.profile(i).y()
|
||||
#)
|
||||
#else:
|
||||
#self.line_xy.append(
|
||||
#self.canvas.axes.plot(
|
||||
#self.data.profile(i).x(),
|
||||
#self.data.profile(i).y(),
|
||||
#color='r',
|
||||
#**self.plot_default_kargs
|
||||
#)
|
||||
#)
|
||||
# <========
|
||||
# TODO comprendre à quoi sert ce bout de code
|
||||
# ========>
|
||||
# for i in range(self.data.number_profiles):
|
||||
# if i < len(self.line_xy):
|
||||
# self.line_xy[i][0].set_data(
|
||||
# self.data.profile(i).x(),
|
||||
# self.data.profile(i).y()
|
||||
# )
|
||||
# else:
|
||||
# self.line_xy.append(
|
||||
# self.canvas.axes.plot(
|
||||
# self.data.profile(i).x(),
|
||||
# self.data.profile(i).y(),
|
||||
# color='r',
|
||||
# **self.plot_default_kargs
|
||||
# )
|
||||
# )
|
||||
# <========
|
||||
|
||||
for i in range(len(x_complete)):
|
||||
if i < len(self.line_gl):
|
||||
|
||||
@@ -297,9 +297,3 @@ class LateralContributionWindow(PamhyrWindow):
|
||||
parent=self
|
||||
)
|
||||
win.show()
|
||||
|
||||
#@pyqtSlot()
|
||||
def onChange(self,i): #changed!
|
||||
QtGui.QMessageBox.information(self,
|
||||
"Tab Index Changed!",
|
||||
"Current Tab Index: %d" % i ) #changed!
|
||||
Reference in new issue
Block a user