Open zhangjb35 opened 5 months ago
Seem just change the op setup in ggseg3d can achieve it.
p = plotly::plot_ly()
for (tt in 1:nrow(atlas3d)) {
col = rep(unlist(atlas3d[tt, fill]), nrow(atlas3d$mesh[[tt]]$faces))
col = ifelse(is.na(col), na.colour, col)
op = ifelse(is.na(unlist(atlas3d[tt, fill])), na.alpha,
0.1)
txt = if (is.null(text)) {
text
}
else {
paste0(text, ": ", unlist(atlas3d[tt, text]))
}
p = plotly::add_trace(p, x = atlas3d$mesh[[tt]]$vertices$x,
y = atlas3d$mesh[[tt]]$vertices$y, z = atlas3d$mesh[[tt]]$vertices$z,
i = atlas3d$mesh[[tt]]$faces$i - 1, j = atlas3d$mesh[[tt]]$faces$j -
1, k = atlas3d$mesh[[tt]]$faces$k - 1, facecolor = col,
type = "mesh3d", text = txt, showscale = FALSE, opacity = op,
name = unlist(atlas3d[tt, label]), ...)
}
Hi! I'm checking in just to say I'm sorry for not following up. I am on long-term sick leave and am not able to deal with maintenance at this point. I will follow up as soon as I am able, and hope someone else might be able to help in the mean time.
Seem the opacity of subcortical structure cannot control by the opacity parameter of ggseg3d.