Large mesh3d plot is not displayed with R-4.4.0
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- r
- Domain
- data-visualization
Research direction
Start with the provided R reproduction using plotly, rmarchingcubes, and a mesh3d trace, comparing n = 100 with n = 50 under R 4.4.0. Investigate why the larger mesh produces a blank viewer, and verify completion when the n = 100 example renders the expected plot without changing the reported setup.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- R
- Stars
- 2.7k
- Forks
- 641
- PR merge metrics
- No merged PRs in 30d
Getting set up
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.
More from plotly/plotly.R
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
-
save_image ErrorOpen
Difficulty 3/5 1-2 days Newbie friendliness 52/100
Similar issues
-
Difficulty 2/5 Half a day Newbie friendliness 78/100
ThinkR-open/datadiff#59 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
duckdb/duckdb-r#2773 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
tidymodels/parsnip#1444 ·
Maintainers usually reply within 4 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100