Skip to content

Commit

Permalink
Update glue/viewers/profile/state.py
Browse files Browse the repository at this point in the history
Co-authored-by: Derek Homeier <[email protected]>
  • Loading branch information
pllim and dhomeier authored Sep 23, 2024
1 parent 321d609 commit a4a87f8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions glue/viewers/profile/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,12 +231,12 @@ def _reset_y_limits(self, *event):
self.y_min = y_min
self.y_max = y_max
elif np.allclose(y_min, y_max):
if np.allclose(y_min, 0):
self.y_min = -0.1
self.y_max = 0.1
if y_min == 0.0:
dy = np.finfo(y_min).resolution**2

Check warning on line 235 in glue/viewers/profile/state.py

View check run for this annotation

Codecov / codecov/patch

glue/viewers/profile/state.py#L234-L235

Added lines #L234 - L235 were not covered by tests
else:
self.y_min = y_min * 0.9
self.y_max = y_max * 1.1
dy = abs(0.1 * y_min)
self.y_min = y_min - dy
self.y_max = y_max + dy

Check warning on line 239 in glue/viewers/profile/state.py

View check run for this annotation

Codecov / codecov/patch

glue/viewers/profile/state.py#L237-L239

Added lines #L237 - L239 were not covered by tests
else:
self.y_min = 0
self.y_max = 1
Expand Down

0 comments on commit a4a87f8

Please sign in to comment.