Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make use of latest improvements to custom stretches in glue-core #409

Merged
merged 2 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion glue_jupyter/bqplot/image/layer_artist.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def _update_image(self, force=False, **kwargs):
if force or any(prop in changed for prop in ('v_min', 'v_max', 'contrast',
'bias', 'alpha', 'color_mode',
'cmap', 'color', 'zorder',
'visible', 'stretch',
'visible', 'stretch', 'stretch_parameters',
'bitmap_visible', 'contour_visible')):
self._update_visual_attributes()
if force or 'levels' in changed:
Expand Down
2 changes: 1 addition & 1 deletion glue_jupyter/bqplot/scatter/layer_artist.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ def _update_visual_attributes(self, changed, force=False):
self.density_mark.vmax = self.state.cmap_vmax

if force or "stretch" in changed:
self.density_mark.stretch = STRETCHES[self.state.stretch]()
self.density_mark.stretch = self.state.stretch_object
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@astrofrog: should this be made dependent on version or availability of stretch_object, or glue-core version requirement be bumped to 1.17?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll just bump the requirements to 1.17


if force or "dpi" in changed:
self.density_mark.dpi = self._viewer_state.dpi
Expand Down
6 changes: 3 additions & 3 deletions glue_jupyter/tests/images/py311-test-visual.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"glue_jupyter.bqplot.scatter.tests.test_visual.test_visual_scatter2d[chromium]": "edd4e65c87369bc6e403f45e87d914223bc13f42c2f90a55535614923e233c00",
"glue_jupyter.bqplot.scatter.tests.test_visual.test_visual_scatter2d_density[chromium]": "60f38b822f89603874cd508e0c320db92185129631dd89a58624dd667eb8a5a7"
}
"glue_jupyter.bqplot.scatter.tests.test_visual.test_visual_scatter2d[chromium]": "fbdd9fe2649a0d72813c03e77af6233909df64207cb834f28da479f50b9e7a1d",
"glue_jupyter.bqplot.scatter.tests.test_visual.test_visual_scatter2d_density[chromium]": "d843a816a91e37cb0212c7caae913d7563f6c2eb42b49fa18345a5952e093b2f"
}
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ python_requires = >=3.8
setup_requires =
setuptools_scm
install_requires =
glue-core>=1.14.1
glue-core>=1.17.1
glue-vispy-viewers>=1.0
notebook>=4.0
ipympl>=0.3.0
Expand Down