Question

I just upgraded R and rgl to the following versions. Now, rgl.snapshot() no longer works. It worked in previous versions. Is there a way around this?

R version 2.12.1 (2010-12-16)
rgl version 0.92.798

> library(rgl)   
> x<-rnorm(100)   
> y<-rnorm(100)   
> z<-rnorm(100)   
> r<-0.2   
> p <- plot3d(x, y, z, axes=FALSE, box=FALSE, radius=r, type='s',    
  + xlab="", ylab="", zlab="", col=rainbow(100))   
> rgl.snapshot("C:\\Temp\\pic.png", fmt="png", top=TRUE )    

Error in rgl.snapshot("C:\\Temp\\pic.png") :     
pixmap save format not supported in this build     
Was it helpful?

Solution

That build doesn't have PNG support (yet). You can use postscript instead:

http://hosho.ees.hokudai.ac.jp/~kubo/Rdoc/library/rgl/html/postscript.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top