【发布时间】:2018-03-10 12:17:12
【问题描述】:
我正在尝试使用 R 中的 rgl 包为具有多个子图的 3d 图添加整体标题,并且我还尝试设置两个子场景之间的距离。在 2D 绘图中,我们可以使用 title("my title",outer=TRUE) 给出整体标题,并使用 "mar" 设置边距。那么,对应的参数是什么呢? 这是我的代码:
rgl.viewpoint(0,0,fov=0)
par3d(windowRect=c(50,50,700,700),zoom=0.8)
mat<-matrix(c(1,2,3,4,5,6),3,2,byrow = TRUE)
height<-c(2,2,2)
width<-c(1,1)
layout3d(mat, height = height,width=width,sharedMouse = TRUE)
for (i in 1:6) {
next3d()
shade3d(shapes[[i]], col = col[i])
}
我想在图片中放一个标题,并调整两个子图之间的距离。
【问题讨论】:
-
请检查您的代码,因为我收到了
Error in shade3d(shapes[[i]], col = col[i]) : object 'shapes' not found -
shapes