[R] rgl snapshot command

Joern Kamradt joern at kamradt.net
Thu Aug 12 19:50:10 CEST 2004


Hi,
I am using the rgl package for 3D display. Unfortunately, I am not able 
to get the snapshot command running.
I tried the following:

 > example(rgl.surface)

rgl.sr> data(volcano)
rgl.sr> y <- 2 * volcano
rgl.sr> x <- 10 * (1:nrow(y))
rgl.sr> z <- 10 * (1:ncol(y))
rgl.sr> ylim <- range(y)
rgl.sr> ylen <- ylim[2] - ylim[1] + 1
rgl.sr> colorlut <- terrain.colors(ylen)
rgl.sr> col <- colorlut[y - ylim[1] + 1]
rgl.sr> rgl.clear()
rgl.sr> rgl.surface(x, z, y, color = col)
 > rgl.snapshot(filename="./volcano.png",fmt="png")
[1] "failed"

Any help is highly appreciated

Joern



__________________________

Joern Kamradt, MD
Cancer Genetic Branch
National Human Genome Research Institute
National Institutes of Health
50 South Drive, building 50, room 5147
Bethesda, MD 20892-8000, USA
Phone#: +1 (301) 496 5382
FAX#:     +1 (301) 402 3241
Email: jkamradt at nhgri.nih.gov
Website: www.genome.gov




More information about the R-help mailing list