I am having trouble with the R package,rgl
(version 0.95.1441), in particular, I cannot reproduce the code from the Examples section of the documentation of the scene3d rgl
function:
http://www.inside-r.org/packages/cran/rgl/docs/plot3d.rglscene
I am using R of version 3.2.4 and R studio 0.99.892 under Windows 8.
open3d()
z <- 2 * volcano # Exaggerate the relief
x <- 10 * (1:nrow(z)) # 10 meter spacing (S to N)
y <- 10 * (1:ncol(z)) # 10 meter spacing (E to W)
persp3d(x, y, z, col = "green3", aspect = "iso")
s <- scene3d()
# Make it bigger
s$par3d$windowRect <- 1.5*s$par3d$windowRect
# and draw it again
plot3d(s)
I am able to produce a 3D image after calling the persp3d
function and I was able to save the rglscene
object into variable s
. However, after executing the last string of the present listing, an extremely narrow window has appeared and it's not possible to see whether it contains anything or not. How I can fix it?