Skip to content
Snippets Groups Projects
Commit f5053b94 authored by Lan Dam's avatar Lan Dam
Browse files

change x0 to x_bottom, x_1 to x_top to be more descriptive

parent 9aa2310d
No related branches found
No related tags found
3 merge requests!149Fix bug happen when zooming in overlap section,!148fix zooming, order, y for the combination of 2 channels GPS_lk_Unlk and GPS_clock_power,!145Change to use matplotlib's lim for zooming
......@@ -181,8 +181,8 @@ class Plotting:
sample_no_pos=[0.25, 0.75],
chan_db_info=chan_db_info, linked_ax=linked_ax)
ax.x0 = np.array(points_list[0])
ax.x1 = np.array(points_list[1])
ax.x_bottom = np.array(points_list[0])
ax.x_top = np.array(points_list[1])
ax.chan_db_info = chan_db_info
return ax
......
......@@ -569,6 +569,18 @@ class PlottingWidget(QtWidgets.QScrollArea):
if not first_time:
new_min_y = None
new_max_y = None
if hasattr(ax, 'x_top'):
# plot_up_down_dots
new_x_bottom_indexes = np.where(
(ax.x_bottom >= self.min_x) &
(ax.x_bottom <= self.max_x))[0]
ax.bottom_total_point_lbl.set_text(
new_x_bottom_indexes.size)
new_x_top_indexes = np.where(
(ax.x_top >= self.min_x) &
(ax.x_top <= self.max_x))[0]
ax.top_total_point_lbl.set_text(
new_x_top_indexes.size)
if hasattr(ax, 'x_list'):
if not hasattr(ax, 'y_list'):
# plot_time_dots and plot_multi_color_dots
......@@ -595,14 +607,6 @@ class PlottingWidget(QtWidgets.QScrollArea):
new_min_y = min(tr_min_ys)
new_max_y = max(tr_max_ys)
ax.center_total_point_lbl.set_text(total_points)
else:
# plot_up_down_dots
new_x0_indexes = np.where(
(ax.x0 >= self.min_x) & (ax.x0 <= self.max_x))[0]
ax.bottom_total_point_lbl.set_text(new_x0_indexes.size)
new_x1_indexes = np.where(
(ax.x1 >= self.min_x) & (ax.x1 <= self.max_x))[0]
ax.top_total_point_lbl.set_text(new_x1_indexes.size)
if new_min_y is not None:
self.plotting_axes.set_axes_ylim(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment