Large mesh3d plot is not displayed with R-4.4.0
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 35/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- r
研究方向
從提供的 R 重現範例開始,使用 plotly、rmarchingcubes 和 mesh3d trace,在 R 4.4.0 下比較 n = 100 與 n = 50。調查較大的網格為何會產生空白檢視器,並在 n = 100 範例呈現出預期圖形且不變更所報告的設定時確認完成。
由索引模型根據 Issue 內容生成。
描述
Hello,
Since I upgraded R to version 4.4.0, my mesh3d plot no longer appears. The viewer renders a blank page. This mesh is large and if I reduce it then it appears.
library(plotly)
library(rmarchingcubes)
R <- 2
f1 <- function(x, y, z){
x^2 + y^2 + z^2 - R^2
}
f2 <- function(x, y, z){
(x-2)^2 + (y-2)^2 + (z-2)^2 - R^2
}
g <- function(x, y, z) {
pmax(f1(x, y, z), f2(x, y, z))
}
n <- 100
x_ <- y_ <- z_ <- seq(-R, R, length.out = n)
Grid <- expand.grid(X = x_, Y = y_, Z = z_)
voxel <- with(Grid, array(g(X, Y, Z), dim = c(n, n, n)))
surf <- contour3d(voxel, level = 0, x_, y_, z_)
vertices <- surf$vertices
indices <- surf$triangles - 1L
plot_ly(
x = vertices[, 1], y = vertices[, 2], z = vertices[, 3],
i = indices[, 1], j = indices[, 2], k = indices[, 3],
type = "mesh3d"
) %>% layout(scene = list(aspectmode = "data"))
If you replace n <- 100 with n <- 50 then the expected plot appears.
- 主要語言
- R
- 星號
- 2.7k
- 分支
- 641
- PR 合併指標
- 30 天內沒有已合併 PR
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
plotly/plotly.R 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 62/100
-
難度 4/5 3-5 天 新手友好度 35/100
-
難度 3/5 1-2 天 新手友好度 68/100
-
難度 3/5 1-2 天 新手友好度 72/100
-
save_image Error 未關閉
難度 3/5 1-2 天 新手友好度 52/100
相似的 Issue
-
Affects Web App documentation PRIORITY LOW
難度 2/5 1-3 小時 新手友好度 75/100
-
難度 2/5 1-3 小時 新手友好度 75/100
-
難度 1/5 1 小時以內 新手友好度 80/100
hubverse-org/hubCI#36 ·
-
難度 1/5 1 小時以內 新手友好度 85/100
-
Release 1.4.0 未關閉
難度 2/5 1-3 小時 新手友好度 70/100
pharmaverse/pharmaverseadam#170 ·