Coder Social home page Coder Social logo

[NX] Support nD scatter plots about h5web HOT 2 OPEN

loichuder avatar loichuder commented on June 5, 2024 1
[NX] Support nD scatter plots

from h5web.

Comments (2)

axelboc avatar axelboc commented on June 5, 2024

Next step would be to understand a bit better how AXIS_indices works; how the axis dataset is structured and mapped; how to deal with various uses/misuses of AXIS_indices; etc. The feature seems very broad, so we need to define the scope a bit better.

from h5web.

axelboc avatar axelboc commented on June 5, 2024

I've renamed this issue to focus on the underlying use case, which is basically to support stacks of scatter plots.

For context, currently, the following code is used to decide that an NXdata group supports the NX Scatter visualization:

axisDatasets.length === 2 && axisDatasets.every((d) => d && hasNumDims(d, 1))

... which basically means that the @axes attribute must declare exactly two 1D datasets (e.g. ["X", "Y"] where both X and Y have only one dimension).

This works great for simple 1D cases (cf. /nexus_entry/scatter in demo) but the complexity increases drastically when dealing with nD signals and axes. This is what the AXIS_indices convention was trying to address, but it doesn't help viewers like H5Web understand how the data is really meant to be plotted.

Where we go from here is still an open question. We considered relaxing the condition above to cover more strictly defined cases, but this would add yet another implicit convention, which does not seem like the right way forward.

@loichuder (and others) suggested introducing an attribute called SILX_scatter (in line with the existing SILX_style attribute) to allow describing scatter plots explicitly, which could take the following shape:

{ 
  "x": "A0", // dataset to use as X coordinates
  "y": "A1", // dataset to use as Y coordinates
  "slice": [0] // dimension(s) on which the user should be able to slice
}

from h5web.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.