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

when zooming, set_axes_ylim only perform when total_points > 1 to prevent the...

parent e3a121ae
No related branches found
No related tags found
1 merge request!150when zooming, set_axes_ylim only perform when total_points > 1 to prevent the...
......@@ -586,12 +586,13 @@ class PlottingWidget(QtWidgets.QScrollArea):
if tr_min_ys != []:
new_min_y = min(tr_min_ys)
new_max_y = max(tr_max_ys)
# in case total_points == 1, y lim shouldn't be set
# again or the plot would be collapsed to one line
if total_points > 1:
self.plotting_axes.set_axes_ylim(
ax, new_min_y, new_max_y)
ax.center_total_point_lbl.set_text(total_points)
if new_min_y is not None:
self.plotting_axes.set_axes_ylim(
ax, new_min_y, new_max_y, ax.chan_db_info)
def draw(self):
"""
Update drawing on the widget.
......
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