-
Notifications
You must be signed in to change notification settings - Fork 28
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
After switching to "Log" or "Square root" scale on an unsupported dataset, the scale selector disappears, making it impossible to reset the scale.
To Reproduce
- Create a dataset that only contains negative values (e. g. a 2D matrix).
Example Python code:
import h5py
with h5py.File("test.h5", "w") as hdf5_file:
hdf5_file.create_dataset("positive_matrix", data=[[1, 2], [3, 4]])
hdf5_file.create_dataset("mixed_matrix", data=[[-1, 2], [3, -4]])
hdf5_file.create_dataset("negative_matrix", data=[[-1, -2], [-3, -4]])
- Open that dataset as a line plot or heatmap.
- Change the scale to "Log" or "Square root"
- Now we get an error indicating our dataset cannot be displayed: "Expected domain compatible with log scale". This is expected behaviour, as the logarithm and square root of a negative number are undefined (at least in the real number space). However, the dropdown selector that is needed to revert to the linear scale is gone. The only way I found to get the linear scale back is to open another dataset that contains positive values.
Expected behaviour
Keep displaying the scale selector even if a dataset contains unsupported data.
Context
- OS: Windows 11 24H2
- H5Web context: H5Web VS Code extension v0.1.7
- I also tried H5Wasm, so it's not a VS Code related issue
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working


