I am trying to add a overall title to a 3d plot with multiple subplots using the rgl package from R,and i am also trying to set the distance between two sub scenes. In 2D plot, we can use title("my title",outer=TRUE) to gave an overall title, and "mar" to set the margin. So, what is the corresponding parameters? Here are my code:
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])
}
I want to put a title in the picture and adjust the distance between two subplots.
Error in shade3d(shapes[[i]], col = col[i]) : object 'shapes' not found- Crparedes