[R] rgl.snapshot on linux produces colored lines only

From: Matt <mattstat_at_yahoo.com>
Date: Mon, 14 Jul 2008 14:51:54 -0700 (PDT)


I'm having a problem with rgl.snapshot. If I run the following code *once* and *once only*, all is well.

data(trees)
attach(trees)
plot3d(Height, Girth, Volume, type='s')
rgl.snapshot("/home/user/pic.png", fmt="png", top=TRUE )

And the pic.png looks right. But if I try to rerun rgl.snapshot anytime again in this session, the file pic.png still outputs but is nothing but colored lines, like in a TV test pattern.

I also tried the built-in example:

    shade3d(oh3d(), color="red")

     rgl.bringtotop()
     rgl.viewpoint(0,20)
     setwd(path)
     for (i in 1:45) {
       rgl.viewpoint(i,20)
       filename <- paste("pic",formatC(i,digits=1,flag="0"),".png",sep="")
       rgl.snapshot(filename)
     }

and all the png files are colored lines.

I seem to have no trouble installing rgl (my configure output is below), and I have seen the previous messages about finding paths to the X11 etc. lirbaries. My libpng is up to date. I have tried this on two different Ubuntu hardy machines and get the same thing.

Anybody else out there get this?

Thanks.

Configure output

 sudo R CMD INSTALL --configure-args='--x-includes=/usr/include/X11 --x-libraries=/usr/lib' rgl_0.79.tar.gz
* Installing to library '/usr/local/lib/R/site-library'


R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Tue 15 Jul 2008 - 00:54:13 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 15 Jul 2008 - 01:31:48 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive