diff --git a/jdaviz/configs/cubeviz/plugins/tools.py b/jdaviz/configs/cubeviz/plugins/tools.py index 02114b848c..ae4a8a9c27 100644 --- a/jdaviz/configs/cubeviz/plugins/tools.py +++ b/jdaviz/configs/cubeviz/plugins/tools.py @@ -190,7 +190,11 @@ def remove_highlight_on_spaxel(self): if not isinstance(x, SelectedSpaxel)] def _calc_coords(self, x, y): - x_coords = [[x - 0.5, x + 0.5], [x - 0.5, x + 0.5]] - y_coords = [[y - 0.5, y + 0.5], [y + 0.5, y - 0.5]] + xmin = x - 0.5 + xmax = x + 0.5 + ymin = y - 0.5 + ymax = y + 0.5 + x_coords = [[xmin, xmax], [xmin, xmax]] + y_coords = [[ymin, ymax], [ymax, ymin]] return x_coords, y_coords