h5web icon indicating copy to clipboard operation
h5web copied to clipboard

surface plot in 3D

Open kevinxiaomu opened this issue 2 years ago • 8 comments

Does h5web supports ploting 3d surfaces? Some thing like the link below:

https://ts1.cn.mm.bing.net/th/id/R-C.7a82fd9d2f59afa278ffbf1b2d9acd57?rik=9fpfi6I4heIVzw&pid=ImgRaw&r=0

kevinxiaomu avatar Nov 20 '22 07:11 kevinxiaomu

No, the closest vis is the Heatmap that has the color mapping but without 3d rendering.

This is something we might implement in the future if there is enough interest for this :slightly_smiling_face:

loichuder avatar Nov 21 '22 08:11 loichuder

Do you think this is difficult to implement? I try to implement this, is that possible for you to provide some quick instructions?

kevinxiaomu avatar Nov 21 '22 11:11 kevinxiaomu

Do you think this is difficult to implement?

Depends. In H5Web, honestly yes :sweat_smile: ! We have a lot of components that rely on the postulate that the view is 2D.

But you could try to come up with your own stand-alone implementation with the libraries we use in H5Web:

If you do, we could then try to integrate it to H5Web.

If this appears too overwhelming, do not worry, I may tackle this myself in the future.

loichuder avatar Nov 21 '22 11:11 loichuder

@kevinxiaomu We have a first implementation in https://github.com/silx-kit/h5web/pull/1303

Before we continue improving it, could you elaborate on your usecase ?

For example, would you want to use this surface plot to display HDF5 datasets in the viewer or to use it as a visualization component in other React apps ?

loichuder avatar Dec 01 '22 10:12 loichuder

@kevinxiaomu We have a first implementation in #1303

Before we continue improving it, could you elaborate on your usecase ?

For example, would you want to use this surface plot to display HDF5 datasets in the viewer or to use it as a visualization component in other React apps ?

I would like to use this surface plot to display hdf5 datasets in the web viewer. Something like this:

https://cn.bing.com/images/search?view=detailV2&ccid=mz%2b0Ohfr&id=6474CE4695A98E74C8AF9CC84EA0FB6C8FA76141&thid=OIP.mz-0Ohfr7TWilbZ8cRZl9wHaGd&mediaurl=https%3a%2f%2fts1.cn.mm.bing.net%2fth%2fid%2fR-C.9b3fb43a17ebed35a295b67c711665f7%3frik%3dQWGnj2z7oE7InA%26riu%3dhttp%253a%252f%252fncss.wpengine.netdna-cdn.com%252fwp-content%252fuploads%252f2013%252f07%252f3D-Surface-Plot.png%26ehk%3d9ihpziT9eZMkMgkkjOn6iCGoNYyprID2lX0djx%252fyi8E%253d%26risl%3d%26pid%3dImgRaw%26r%3d0&exph=507&expw=581&q=surface+plot+chart&simid=608018467273668664&FORM=IRPRST&ck=31D9599CE728B182679548F3ADC1863A&selectedIndex=24&ajaxhist=0&ajaxserp=0

kevinxiaomu avatar Dec 04 '22 08:12 kevinxiaomu

Hi @kevinxiaomu, may I ask for a bit more detail?

  • Where do you use the H5Web viewer (VS Code extension, JupyterLab extension, portal integration, custom app ...)?
  • What kind of data do you work with? How big is it? Do you have custom values/domains/units for the axes?
  • Does your HDF5 file use NeXus or another metadata format to describe how the data should be plotted, or do you rather expect the viewer to allow you to build your own plot by selecting the right datasets youself?
  • Can you maybe send us a sample file?

axelboc avatar Dec 05 '22 08:12 axelboc

Dear developers. How to enable this 3D view? I updated H5Web to the latest version but still don't see surf view.

karnevskiy avatar Mar 22 '23 21:03 karnevskiy

The vis is still unfinished so it is not yet released. Sorry

loichuder avatar Mar 27 '23 09:03 loichuder