-
Notifications
You must be signed in to change notification settings - Fork 39
Description
Describe the bug
The histogram viewer's y-axis limits are not properly reset when using the normalize/cumulative toggle buttons in the viewer UI.
To Reproduce
Steps to reproduce the behavior such as:
- Create a histogram viewer, populated with some data
- Use the normalize/cumulative toggle buttons in the viewer options (accessed by opening the right hamburger menu)
Expected behavior
The y limits should change to reflect the new viewer state.
Screenshots
See the video below:
https://github.com/glue-viz/glue-jupyter/assets/14281631/05c048fc-d1cd-4c7b-a73e-f23fed4cb258
Details:
- Operating System: Ubuntu 20.04
- Python version: 3.11
- Glue version: (glue-core 1.12, glue-jupyter from commit 3b24faf)
- How you installed glue-jupyter: pip (editable mode from source)
Additional context
As shown in the video above, the limit resetting works fine when the viewer state is manipulated directly in a cell - this problem only appears when using the UI.
After tracing through some calls, I can confirm that the viewer state and bqplot limits are initially updated (via the viewer's update_bqplot_limits
) to what should be the new correct values. However, there are also later call(s) (usually just one since only y_max
is changing) with the old limit value(s), which undo the previous change. I'm not sure yet what is causing these. The fact that this only happens when using the UI makes me wonder whether this could involve communication between the frontend and backend via the GlueState
in HistogramViewerStateWidget
.