silx-kit / jupyterlab-h5web

A JupyterLab extension to explore and visualize HDF5 file contents. Based on https://github.com/silx-kit/h5web.
MIT License
65 stars 8 forks source link

Customize colors of 2D plots in H5Web cell #82

Open axelboc opened 2 years ago

axelboc commented 2 years ago

H5Web allows customizing the colors in 2D plots, which is done in the css. It would be great to have a way to be able to inject this to invoking these widgets in Jupyter lab.

Originally posted by @tomio13 in https://github.com/silx-kit/jupyterlab-h5web/issues/34#issuecomment-1041231232

axelboc commented 2 years ago

Hi @tomio13, could you please tell us more about what you're doing with H5Web? How you're using it (in a cell or in a tab), with what kind of data, etc.

tomio13 commented 2 years ago

Thank you for the fast response. In one case we are using it within a jupyter lab notebook to visualize NEXUS data output files with several curves to be plotted together. The specific example I used was an ellipsometry curve containing 3 Psi and 3 Delta curves each at a different incident angles.

axelboc commented 2 years ago

Okay, thanks, and so I take it from your issue in the H5Web repo https://github.com/silx-kit/h5web/issues/970 that you'd like the curves to be more easily identifiable and distinguishable from one another? Is this just a matter of changing the extension's default auxiliary curve colours so they're not all the same, or do you need actual control over the colours every time your run the H5Web widget?

tomio13 commented 2 years ago

Yes. As I see, the story has two aspects: on the one hand just changing the style such that a series of colors would be used is a good starting point. On the other hand, giving the possibility to set this by the user e.g. through setting an optional class, would be a really nice solution.

loichuder commented 2 years ago

May be linked to https://github.com/silx-kit/h5web/issues/1209