plotly / plotly/plotly.R

Contour not shown correctly in 3D Tri-Surf Plots

未关闭
#1,829 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
R
星标
2.7k
派生
641
PR 合并指标
30 天内没有已合并 PR

描述


When plotting the 3D tri-surf figure, if we don't specify the facecolor of the plot, the contour will work well.
However, if we specify the faceolor of each faces, the contour will be stuck in the middle can't move and the coordinate
of each vertex also doesn't show its correct x,y,z.
The examples in the tutorials also have this problem.
Not sure if there have other way to specifiy the facecolor without making these issues.
Thank you very much for your help!

fig <- plot_ly(type = 'mesh3d',
  x = c(0, 1, 2, 0),
  y = c(0, 0, 1, 2),
  z = c(0, 2, 0, 1),
  i = c(0, 0, 0, 1),
  j = c(1, 2, 3, 2),
  k = c(2, 3, 1, 3),
  opacity = 0.5,
  contour = list(show = TRUE, color="#000", width=15)
  #facecolor = toRGB(viridisLite::viridis(4))
)
fig
fig <- plot_ly(type = 'mesh3d',
  x = c(0, 1, 2, 0),
  y = c(0, 0, 1, 2),
  z = c(0, 2, 0, 1),
  i = c(0, 0, 0, 1),
  j = c(1, 2, 3, 2),
  k = c(2, 3, 1, 3),
  opacity = 0.5,
  contour = list(show = TRUE, color="#000", width=15),
  facecolor = toRGB(viridisLite::viridis(4))
)
fig

贡献指南

打开贡献指南

从这里开始

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

调研方向

首先运行 issue 中提供的两个 R plot_ly mesh3d 示例,并比较有无 facecolor 时等高线的移动情况和顶点坐标。跟踪 3D tri-surf 渲染路径以确定差异,并在 facecolor 不再导致等高线位置或坐标错误时将 issue 视为完成。

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

评估

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

把新 issue 发到你的邮箱

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