Skip to content

Commit

Permalink
Merge pull request #2395 from meeseeksmachine/auto-backport-of-pr-239…
Browse files Browse the repository at this point in the history
…3-on-v3.6.x

Backport PR #2393 on branch v3.6.x (fix subset histogram bug in plot options)
  • Loading branch information
cshanahan1 authored Aug 25, 2023
2 parents 340c7c8 + d267458 commit b065dce
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ Bug Fixes
the selection when the choices change if any of the previous entries are still
valid. [#2344]

- Fixed Plot Options stretch histogram bug that raised an error when a spatial subset
was selected in Imviz and Cubeviz. [#2393]

Cubeviz
^^^^^^^

Expand Down
5 changes: 5 additions & 0 deletions jdaviz/configs/default/plugins/plot_options/plot_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from ipywidgets import widget_serialization
from traitlets import Any, Dict, Float, Bool, Int, List, Unicode, observe

from glue.core.subset_group import GroupedSubset
from glue.viewers.scatter.state import ScatterViewerState
from glue.viewers.profile.state import ProfileViewerState, ProfileLayerState
from glue.viewers.image.state import ImageSubsetLayerState
Expand Down Expand Up @@ -570,6 +571,10 @@ def _update_stretch_histogram(self, msg={}):
# skip further updates if no data are available:
return

if isinstance(data, GroupedSubset):
# don't update histogram for subsets:
return

comp = data.get_component(data.main_components[0])

# TODO: further optimization could be done by caching sub_data
Expand Down

0 comments on commit b065dce

Please sign in to comment.