silx-kit / h5web

React components for data visualization and exploration
https://h5web.panosc.eu/
MIT License
190 stars 19 forks source link

Keep zoom level and axis positions fixed between files #1572

Open jpmvferreira opened 9 months ago

jpmvferreira commented 9 months ago

Given that this tool is made to quickly have a glance at data (1D, 2D or 3D), I think it would be convenient to add an option that allows the user to keep the same zoom level and axis positions fixed as the user is browsing through different files.

To illustrate what I mean, let us say that I have a HDF5 file where each dataset corresponds to a 3D array at a given time. If I want to see the differences at z=0 with time, I just set a fixed data range for the color map and browse the different files.

https://github.com/silx-kit/h5web/assets/41581666/cc0e6741-f674-49be-8877-80c2f981f8a5

However, if I happen to want to compare the snapshots at different values of z, then every time I change between datatsets I have to manually adjust the z coordinate correspondingly (apologies for the ghost cursor in the next video).

https://github.com/silx-kit/h5web/assets/41581666/3803232e-8b1a-442f-96e4-5217e7fb3c4a

Also, if I only want to see differences in a particular region, the zoom level also changes as I go through the datasets.

https://github.com/silx-kit/h5web/assets/41581666/d1a27497-f93f-4768-a411-77265cfc1120

The two previous issues are also true when it comes to line plots, with an additional issue: whereas in the heatmap you can choose an arbitrary data range, here you can either set "auto-scale" on or off, but off does not allow you to pick any values whatsoever.

Apologies for not following the feature request template that was provided, but I feel like I could explain myself better this way.

axelboc commented 9 months ago

@jpmvferreira thanks for the feedback! It's really three requests in one, but we're on board with all of them. 😊 Here is what I'm thinking of implementing in more details:

Would that answer your needs?

jpmvferreira commented 9 months ago

Yes those looks like perfect solutions!

joaonizer commented 5 months ago

I would benefit of this enhancement! I would also add the possibility to keep the dimensions order the same (xD1, yD2 or vice versa) across datasets in the same low-level visualization.

axelboc commented 4 months ago

The simplest of the three feature requests, the replacement of the Autoscale toggle by a domain widget in the Line visualization's toolbar, is now fixed and available in myHDF5 and the VS Code extension:

image

I'll investigate persisting the dimension mapping state a bit more when I get the time.

axelboc commented 1 month ago

H5Web 13 now preserves dimension mapping/slicing when possible:

maintain-dim-mapping