plotly / plotly/plotly.js

Volume on non-uniform grid does not appear

未关闭
#6,673 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

bug P3
主要语言
JavaScript
星标
18.3k
派生
2k
平均合并
2 天 12 小时
30 天内合并 PR
28

描述

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.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从链接的 CodePen 复现示例开始,在 volume trace 中比较 uniform-grid 和 affine-transformed 两种情况。阅读 volume 参考文档,尤其是其中的坐标要求,然后跟踪 volume rendering 的入口点,以确定 non-uniform grid 产生空白 canvas 的原因。当 affine-transformed volume 能够渲染,同时现有的 uniform-grid 行为保持不变时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript
领域
data-visualization
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。