r - 填写大纲

标签 r plot 3d rgl

以下代码绘制了一些点并将它们与线连接起来。我要填写
选择颜色和Alpha的线条所包围的区域。我似乎看不到如何使用rgl

# Open plot and add axes
open3d()
decorate3d(xlim=c(0,4), ylim=c(0,4), zlim=c(0,4), 
       xlab = NULL, ylab = NULL, zlab = NULL,
       box = FALSE, axes = FALSE, 
       main = "", sub = NULL,
       top = TRUE, aspect = FALSE)
axis3d(edge="z", col="blue")
axis3d(edge="x", col="green")
axis3d(edge="y", col="green")
# Draw some points and connect by lines
#             x y z 
vs = matrix(c(1,1,1, 1,2,1, 2,3,1, 2,3,2, 1,2,2, 1,2,2, 1,1,2), byrow=TRUE, ncol=3)
points3d(vs, size=4, col="red")
lines3d(rbind(vs, c(1,1,1)))

最佳答案

怎么样:

quads3d(vs[c(1:2,5,7),],col="purple",alpha=0.5)
quads3d(vs[c(2:5),],col="cyan",alpha=0.5)


关于r - 填写大纲,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9022814/

相关文章:

python - matplotlib 带有更改标签的 3D 绘图

r - 将因子级别更改为列的自定义顺序

python - 如何更改刻度之间的间距

Matlab:用3个向量制作等高线图

c++ - 获取3d空间中声音的 "pan"

c# - 具有 DiffuseMaterial 的 ModelVisual3D 的透明度

删除 roxygen 标签/部分

r - 使用 tidyverse 从选择性 "Per Day"数字创建 "Per Month"行

r - caret::train: 指定模型生成参数

matlab - 在轮廓图的顶部叠加轮廓线