Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch order of setting ymin and ymax #3371

Merged
merged 4 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ Bug Fixes

- Fixed bug with Plot Options select_all when data is float32. [#3366]

- Fixed an issue with back-to-back calls of set_limits and get_limits. [#3371]


Cubeviz
^^^^^^^
Expand Down
7 changes: 5 additions & 2 deletions jdaviz/configs/default/plugins/viewers.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,13 @@ def set_limits(self, x_min=None, x_max=None, y_min=None, y_max=None):
self.state.x_min = x_min
if x_max is not None:
self.state.x_max = x_max
if y_min is not None:
self.state.y_min = y_min
# NOTE: for some reason, setting ymax first avoids an issue
# where back-to-back calls of get_limits and set_limits
# give different results for y limits.
if y_max is not None:
self.state.y_max = y_max
if y_min is not None:
self.state.y_min = y_min

def get_limits(self):
"""Return current viewer axes limits.
Expand Down
Loading