diff --git a/CHANGES.rst b/CHANGES.rst index 187cea1255..b5224d3bec 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -81,6 +81,8 @@ Other Changes and Additions - Add swatches to color picker. [#2494] +- Plot options now includes better support for scatter viewers, including toggling line visibility. [#2449] + 3.7.1 (unreleased) ================== diff --git a/jdaviz/configs/default/plugins/plot_options/plot_options.py b/jdaviz/configs/default/plugins/plot_options/plot_options.py index ae40a8c243..bdc19b581b 100644 --- a/jdaviz/configs/default/plugins/plot_options/plot_options.py +++ b/jdaviz/configs/default/plugins/plot_options/plot_options.py @@ -312,10 +312,9 @@ def state_attr_for_line_visible(state): return 'visible' # Profile/line viewer/layer options: - # TODO: once lines are supported in ScatterViewer, update state_filter to supports_line self.line_visible = PlotOptionsSyncState(self, self.viewer, self.layer, state_attr_for_line_visible, # noqa 'line_visible_value', 'line_visible_sync', - state_filter=is_profile) + state_filter=supports_line) self.collapse_function = PlotOptionsSyncState(self, self.viewer, self.layer, 'function', 'collapse_func_value', 'collapse_func_sync') self.line_color = PlotOptionsSyncState(self, self.viewer, self.layer, 'color', @@ -333,6 +332,7 @@ def state_attr_for_line_visible(state): 'uncertainty_visible_value', 'uncertainty_visible_sync') # noqa # Scatter/marker options: + # NOTE: marker_visible hides the entire layer (including the line) self.marker_visible = PlotOptionsSyncState(self, self.viewer, self.layer, 'visible', 'marker_visible_value', 'marker_visible_sync', state_filter=is_scatter) diff --git a/jdaviz/configs/default/plugins/plot_options/plot_options.vue b/jdaviz/configs/default/plugins/plot_options/plot_options.vue index aefe22a8f4..d3dfe24b3f 100644 --- a/jdaviz/configs/default/plugins/plot_options/plot_options.vue +++ b/jdaviz/configs/default/plugins/plot_options/plot_options.vue @@ -66,11 +66,11 @@ mdi-eye{{ marker_visible_value ? '' : '-off' }} - Show Marker + Show Scatter Layer - + mdi-eye{{ line_visible_value ? '' : '-off' }} @@ -108,7 +108,16 @@ - Line + Line + + + + mdi-eye{{ line_visible_value ? '' : '-off' }} + + Show Line + + + - + Line Color @@ -139,25 +148,25 @@ - + - + Line Opacity - + - + - + Marker