mirror of https://gitlab.com/pamhyr/pamhyr2
Geometry: Revert previous plot display fix.
parent
40757b949d
commit
6a0f66c244
|
|
@ -340,36 +340,36 @@ class PlotAC(PamhyrPlot):
|
||||||
self.color_complete_gl = self.get_line_gl_colors(line_2d)
|
self.color_complete_gl = self.get_line_gl_colors(line_2d)
|
||||||
self.color_incomplete_gl = 2 * ["#000000"]
|
self.color_incomplete_gl = 2 * ["#000000"]
|
||||||
|
|
||||||
# if ind is not None:
|
if ind is not None:
|
||||||
# before = ind - 1
|
before = ind - 1
|
||||||
# after = ind + 1
|
after = ind + 1
|
||||||
|
|
||||||
# self.before_plot_selected.set_data([], [])
|
self.before_plot_selected.set_data([], [])
|
||||||
# self.plot_selected.set_data([], [])
|
self.plot_selected.set_data([], [])
|
||||||
# self.after_plot_selected.set_data([], [])
|
self.after_plot_selected.set_data([], [])
|
||||||
|
|
||||||
# if 0 <= before < self.data.number_profiles:
|
if 0 <= before < self.data.number_profiles:
|
||||||
# self.before_plot_selected.set_data(
|
self.before_plot_selected.set_data(
|
||||||
# self.data.profile(before).get_station(),
|
self.data.profile(before).get_station(),
|
||||||
# self.data.profile(before).z()
|
self.data.profile(before).z()
|
||||||
# )
|
)
|
||||||
|
|
||||||
# if 0 <= ind < self.data.number_profiles:
|
if 0 <= ind < self.data.number_profiles:
|
||||||
# self.plot_selected.set_data(
|
self.plot_selected.set_data(
|
||||||
# self.data.profile(ind).get_station(),
|
self.data.profile(ind).get_station(),
|
||||||
# self.data.profile(ind).z()
|
self.data.profile(ind).z()
|
||||||
# )
|
)
|
||||||
|
|
||||||
# if 0 <= after < self.data.number_profiles:
|
if 0 <= after < self.data.number_profiles:
|
||||||
# self.after_plot_selected.set_data(
|
self.after_plot_selected.set_data(
|
||||||
# self.data.profile(after).get_station(),
|
self.data.profile(after).get_station(),
|
||||||
# self.data.profile(after).z()
|
self.data.profile(after).z()
|
||||||
# )
|
)
|
||||||
|
|
||||||
# self.update_annotate_full(ind)
|
self.update_annotate_full(ind)
|
||||||
# else:
|
else:
|
||||||
self.update_full()
|
self.update_full()
|
||||||
self.update_annotate_full(0)
|
self.update_annotate_full(0)
|
||||||
|
|
||||||
self.canvas.axes.relim()
|
self.canvas.axes.relim()
|
||||||
self.canvas.axes.autoscale()
|
self.canvas.axes.autoscale()
|
||||||
|
|
|
||||||
|
|
@ -185,76 +185,76 @@ class PlotKPZ(PamhyrPlot):
|
||||||
self.draw()
|
self.draw()
|
||||||
return
|
return
|
||||||
|
|
||||||
# if ind is not None:
|
if ind is not None:
|
||||||
# before = ind - 1
|
before = ind - 1
|
||||||
# after = ind + 1
|
after = ind + 1
|
||||||
|
|
||||||
# self.before_plot_selected.set_visible(False)
|
self.before_plot_selected.set_visible(False)
|
||||||
# self.plot_selected.set_visible(False)
|
self.plot_selected.set_visible(False)
|
||||||
# self.after_plot_selected.set_visible(False)
|
self.after_plot_selected.set_visible(False)
|
||||||
|
|
||||||
# if 0 <= before < self.data.number_profiles:
|
if 0 <= before < self.data.number_profiles:
|
||||||
# profile = self.data.profile(before)
|
profile = self.data.profile(before)
|
||||||
# if len(profile) > 0:
|
if len(profile) > 0:
|
||||||
# kp_i = profile.kp
|
kp_i = profile.kp
|
||||||
# z_min_i = profile.z_min()
|
z_min_i = profile.z_min()
|
||||||
# z_max_i = profile.z_max()
|
z_max_i = profile.z_max()
|
||||||
|
|
||||||
# self.before_plot_selected.set_data(
|
self.before_plot_selected.set_data(
|
||||||
# (kp_i, kp_i),
|
(kp_i, kp_i),
|
||||||
# (z_min_i, z_max_i)
|
(z_min_i, z_max_i)
|
||||||
# )
|
)
|
||||||
# self.before_plot_selected.set_visible(True)
|
self.before_plot_selected.set_visible(True)
|
||||||
|
|
||||||
# if 0 <= ind < self.data.number_profiles:
|
if 0 <= ind < self.data.number_profiles:
|
||||||
# profile = self.data.profile(ind)
|
profile = self.data.profile(ind)
|
||||||
# if len(profile) > 0:
|
if len(profile) > 0:
|
||||||
# kp_i = profile.kp
|
kp_i = profile.kp
|
||||||
# z_min_i = profile.z_min()
|
z_min_i = profile.z_min()
|
||||||
# z_max_i = profile.z_max()
|
z_max_i = profile.z_max()
|
||||||
|
|
||||||
# self.plot_selected.set_data(
|
self.plot_selected.set_data(
|
||||||
# (kp_i, kp_i),
|
(kp_i, kp_i),
|
||||||
# (z_min_i, z_max_i)
|
(z_min_i, z_max_i)
|
||||||
# )
|
)
|
||||||
# self.plot_selected.set_visible(True)
|
self.plot_selected.set_visible(True)
|
||||||
|
|
||||||
# if 0 <= after < self.data.number_profiles:
|
if 0 <= after < self.data.number_profiles:
|
||||||
# profile = self.data.profile(after)
|
profile = self.data.profile(after)
|
||||||
# if len(profile) > 0:
|
if len(profile) > 0:
|
||||||
# kp_i = profile.kp
|
kp_i = profile.kp
|
||||||
# z_min_i = profile.z_min()
|
z_min_i = profile.z_min()
|
||||||
# z_max_i = profile.z_max()
|
z_max_i = profile.z_max()
|
||||||
|
|
||||||
# self.after_plot_selected.set_data(
|
self.after_plot_selected.set_data(
|
||||||
# (kp_i, kp_i),
|
(kp_i, kp_i),
|
||||||
# (z_min_i, z_max_i)
|
(z_min_i, z_max_i)
|
||||||
# )
|
)
|
||||||
# self.after_plot_selected.set_visible(True)
|
self.after_plot_selected.set_visible(True)
|
||||||
|
|
||||||
# self.canvas.figure.canvas.draw_idle()
|
self.canvas.figure.canvas.draw_idle()
|
||||||
# else:
|
else:
|
||||||
kp = self.data.get_kp_complete_profiles()
|
kp = self.data.get_kp_complete_profiles()
|
||||||
z_min = self.data.get_z_min()
|
z_min = self.data.get_z_min()
|
||||||
z_max = self.data.get_z_max()
|
z_max = self.data.get_z_max()
|
||||||
|
|
||||||
self.line_kp_zmin.set_data(kp, z_min)
|
self.line_kp_zmin.set_data(kp, z_min)
|
||||||
|
|
||||||
self.line_kp_zmin_zmax.remove()
|
self.line_kp_zmin_zmax.remove()
|
||||||
self.line_kp_zmin_zmax = self.canvas.axes.vlines(
|
self.line_kp_zmin_zmax = self.canvas.axes.vlines(
|
||||||
x=kp,
|
x=kp,
|
||||||
ymin=z_min, ymax=z_max,
|
ymin=z_min, ymax=z_max,
|
||||||
color='r', lw=1.
|
color='r', lw=1.
|
||||||
)
|
)
|
||||||
|
|
||||||
z_complete = self.data.get_guidelines_z()
|
z_complete = self.data.get_guidelines_z()
|
||||||
try:
|
try:
|
||||||
for i in range(len(self.line_kp_zgl)):
|
for i in range(len(self.line_kp_zgl)):
|
||||||
self.line_kp_zgl[i][0].set_data(
|
self.line_kp_zgl[i][0].set_data(
|
||||||
kp, z_complete[i]
|
kp, z_complete[i]
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.warning(f"Failed to update graphic KPZ: {e}")
|
logger.warning(f"Failed to update graphic KPZ: {e}")
|
||||||
|
|
||||||
self.canvas.axes.autoscale_view(True, True, True)
|
self.canvas.axes.autoscale_view(True, True, True)
|
||||||
self.canvas.figure.canvas.draw_idle()
|
self.canvas.figure.canvas.draw_idle()
|
||||||
|
|
|
||||||
|
|
@ -152,12 +152,12 @@ class PlotXY(PamhyrPlot):
|
||||||
x_complete = list(self.data.get_guidelines_x())
|
x_complete = list(self.data.get_guidelines_x())
|
||||||
y_complete = list(self.data.get_guidelines_y())
|
y_complete = list(self.data.get_guidelines_y())
|
||||||
|
|
||||||
self.line_gl = [
|
# self.line_gl = [
|
||||||
self.canvas.axes.plot(
|
# self.canvas.axes.plot(
|
||||||
x, y,
|
# x, y,
|
||||||
)
|
# )
|
||||||
for x, y in zip(x_complete, y_complete)
|
# for x, y in zip(x_complete, y_complete)
|
||||||
]
|
# ]
|
||||||
|
|
||||||
for i in range(self.data.number_profiles):
|
for i in range(self.data.number_profiles):
|
||||||
if i < len(self.line_xy):
|
if i < len(self.line_xy):
|
||||||
|
|
|
||||||
|
|
@ -200,9 +200,9 @@ class GeometryWindow(PamhyrWindow):
|
||||||
|
|
||||||
def update(self):
|
def update(self):
|
||||||
self.update_profile_windows()
|
self.update_profile_windows()
|
||||||
# self.plot_xy()
|
self.plot_xy()
|
||||||
# self.plot_kpc()
|
self.plot_kpc()
|
||||||
# self.plot_ac()
|
self.plot_ac()
|
||||||
|
|
||||||
self.select_current_profile()
|
self.select_current_profile()
|
||||||
self.changed_slider_value()
|
self.changed_slider_value()
|
||||||
|
|
@ -530,16 +530,16 @@ class GeometryWindow(PamhyrWindow):
|
||||||
def _undo(self):
|
def _undo(self):
|
||||||
self._table.undo()
|
self._table.undo()
|
||||||
self.select_current_profile()
|
self.select_current_profile()
|
||||||
# self.update_plot_ac()
|
self.update_plot_ac()
|
||||||
# self.update_plot_xy()
|
self.update_plot_xy()
|
||||||
# self.update_plot_kpc()
|
self.update_plot_kpc()
|
||||||
|
|
||||||
def _redo(self):
|
def _redo(self):
|
||||||
self._table.redo()
|
self._table.redo()
|
||||||
self.select_current_profile()
|
self.select_current_profile()
|
||||||
# self.update_plot_ac()
|
self.update_plot_ac()
|
||||||
# self.update_plot_xy()
|
self.update_plot_xy()
|
||||||
# self.update_plot_kpc()
|
self.update_plot_kpc()
|
||||||
|
|
||||||
def export_to_file(self):
|
def export_to_file(self):
|
||||||
settings = QSettings(
|
settings = QSettings(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue