Skip to content

Commit

Permalink
prevent vmin/vmax lines in stretch histogram from clearing
Browse files Browse the repository at this point in the history
was happening on a change in multiselect which clears the entire stretch histogram.
  • Loading branch information
kecnry committed Nov 22, 2023
1 parent cde8d3f commit 69fb54a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions jdaviz/configs/default/plugins/plot_options/plot_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -893,11 +893,15 @@ def _update_stretch_curve(self, msg=None):

@observe('stretch_vmin_value')
def _stretch_vmin_changed(self, msg=None):
self.stretch_histogram.marks['vmin'].x = [self.stretch_vmin_value, self.stretch_vmin_value]
mark = self.stretch_histogram.marks['vmin']
mark.x = [self.stretch_vmin_value, self.stretch_vmin_value]
mark.y = [0, 1]

@observe('stretch_vmax_value')
def _stretch_vmax_changed(self, msg=None):
self.stretch_histogram.marks['vmax'].x = [self.stretch_vmax_value, self.stretch_vmax_value]
mark = self.stretch_histogram.marks['vmax']
mark.x = [self.stretch_vmax_value, self.stretch_vmax_value]
mark.y = [0, 1]

@observe("stretch_hist_nbins")
def _histogram_nbins_changed(self, msg={}):
Expand Down

0 comments on commit 69fb54a

Please sign in to comment.