Skip to content

Commit

Permalink
Update state.py
Browse files Browse the repository at this point in the history
  • Loading branch information
pllim authored Sep 23, 2024
1 parent c407b70 commit 321d609
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions glue/viewers/profile/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +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):
self.y_min = y_min * 0.9
self.y_max = y_max * 1.1
if np.allclose(y_min, 0):
self.y_min = -0.1
self.y_max = 0.1

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

View check run for this annotation

Codecov / codecov/patch

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

Added lines #L234 - L236 were not covered by tests
else:
self.y_min = y_min * 0.9
self.y_max = y_max * 1.1

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#L238-L239

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

0 comments on commit 321d609

Please sign in to comment.