Skip to content

Commit

Permalink
temporary workaround to segfault on some machines
Browse files Browse the repository at this point in the history
  • Loading branch information
kecnry committed Oct 9, 2023
1 parent f253e13 commit 6bb3257
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions jdaviz/configs/default/plugins/plot_options/plot_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,10 +394,10 @@ def state_attr_for_line_visible(state):

self.stretch_histogram = Plot(self, viewer_type='histogram')
# NOTE: this is a current workaround so the histogram viewer doesn't crash when replacing
# data
self.stretch_histogram._add_data('ref', x=[0])
# data. Note also that passing x=[0] fails on SOME machines, so we'll pass [0, 1] instead
self.stretch_histogram._add_data('ref', x=[0, 1])
self.stretch_histogram.layers['ref'].state.visible = False
self.stretch_histogram._add_data('histogram', x=[0])
self.stretch_histogram._add_data('histogram', x=[0, 1])

self.stretch_histogram.add_line('vmin', x=[0, 0], y=[0, 1], ynorm=True, color='#c75d2c')
self.stretch_histogram.add_line('vmax', x=[0, 0], y=[0, 1], ynorm=True, color='#c75d2c')
Expand Down

0 comments on commit 6bb3257

Please sign in to comment.