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

Merge branch 'i30_29_zoom_emptygap' into 'master'

Fig Error when zoom in the section that has no data

See merge request !64
parents c1f43818 bef3ea3b
No related branches found
No related tags found
1 merge request!64Fig Error when zoom in the section that has no data
Pipeline #2137 passed with stage
in 3 minutes and 49 seconds
......@@ -249,6 +249,8 @@ class PlottingAxes:
ax.spines['top'].set_visible(False)
ax.spines['bottom'].set_visible(False)
else:
if y.size == 0:
return
min_y = y.min()
max_y = y.max()
ax.spines['top'].set_visible(True)
......
......@@ -482,6 +482,8 @@ class PlottingWidget(QtWidgets.QScrollArea):
if hasattr(ax, 'y'):
# don't need to reset y range if ax.y not exist
new_x = ax.x[new_x_indexes]
if new_x.size == 0:
return
new_min_x = min(new_x)
new_max_x = max(new_x)
try:
......
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