rgl.snapshot() No Longer Works

感情迁移 提交于 2019-12-02 09:07:55

问题


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     

回答1:


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



来源:https://stackoverflow.com/questions/4543272/rgl-snapshot-no-longer-works

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!