Volume on non-uniform grid does not appear
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 18.3k
- Forks
- 2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 28
Description
Plotting a 3D volume with a non-uniform grid yields a blank canvas with only the axes and the side bar.
Non-uniform means that the x, y, and z parameters are not simply obtained from a call to mgrid. For my application, they correspond to an affine transformation of such a regular grid, exactly like in https://community.plotly.com/t/3d-volume-plotting-with-non-orthogonal-grid/51662. There is also a StackOverflow answer pointing to this problem: https://stackoverflow.com/questions/66141821/plotting-a-3d-volume-plot-in-r-using-discrete-3d-points#answers.
This is either a bug or simply a documentation mistake, since the reference explicitly states that the coordinates should come from a "uniform or non-uniform 3-D grid" (see https://plotly.com/javascript/reference/volume/#volume).
Reproducer: https://codepen.io/Liozou/pen/OJaQMzK. On the left, the expected behavior, working on a uniform grid. On the right, the issue, on an affine-transformed grid. Black dots are used to visualize the grid itself.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked CodePen reproducer and compare the uniform-grid and affine-transformed cases in the volume trace. Read the volume reference, especially its coordinate requirements, then trace the volume rendering entry point to identify why the non-uniform grid produces a blank canvas. Done means the affine-transformed volume renders while the existing uniform-grid behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100