[R] rgl_081.708: rgl.snapshot fails, causing persistent problems

Duncan Murdoch murdoch at stats.uwo.ca
Wed Oct 8 19:16:32 CEST 2008


On 10/8/2008 12:42 PM, Michael Friendly wrote:
> Thanks, John
> 
> What you say about mixing rgl.* and *3d calls may be true, but that is 
> not my problem. After this occurred,
> I tried many things, but reduced it to the smallest, most basic example 
> (in my original post), using only plot3d(), that
> worked perfectly in both the CRAN and R-Forge versions, until the first 
> time I used rgl.snapshot()
> with the development version.
> 
> Unfortunately, I'm now in a position where I can't test whether 
> snapshot3d() does not provoke this,
> because the basic *3d calls no longer work properly on my desktop 
> machine. I'm reduced to working on my laptop to
> create images for an upcoming talk.

Sorry to take a while to respond on this.  I don't see the behaviour 
you're describing.  I see that rgl.snapshot fails when I use the R-forge 
build, but it doesn't affect anything else.  (I can guess why 
rgl.snapshot fails, but it makes no sense that this would have the side 
effects you're seeing.)

A wild guess is that the OpenGL driver on your desktop system has 
problems, but those shouldn't persist over a system reboot.

Another guess is that you've got something in your workspace (e.g. an 
r3dDefaults variable) and it is causing trouble.  But then you should see

Attaching package: 'rgl'


         The following object(s) are masked _by_ .GlobalEnv :

          r3dDefaults

and you would notice that.

I have put a good build of rgl 0.81.708 online, but I can't see how it 
would behave any better than the CRAN 0.81.  If you feel like trying 
something that probably won't help, download and install 
http://www.stats.uwo.ca/faculty/murdoch/temp/rgl_0.81.708.zip

Duncan Murdoch

> 
> -Michael
> 
> John Fox wrote:
>> Dear Michael,
>>
>> I haven't tried rgl.snapshot() in the development version of rgl, so I can't
>> comment on that, but I believe that these are two unrelated problems. I
>> think that the version of rgl on CRAN fails to display text when rgl.* and
>> *3d function calls are mixed, while this works in the development version.
>>
>> I hope this helps,
>>  John
>>
>>
>>   
>>> -----Original Message-----
>>> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
>>>     
>> On
>>   
>>> Behalf Of Michael Friendly
>>> Sent: October-08-08 10:54 AM
>>> To: R-Help
>>> Subject: [R] rgl_081.708: rgl.snapshot fails, causing persistent problems
>>>
>>> *Summary*:  The latest Windows binary version of rgl_081.708 from
>>> R-Forge has some problem that
>>> causes rgl.snapshot() to fail, at least on my system.
>>> Thereafter, *all* rgl 3D graphics are rendered without any text labels.
>>> The last problem remains even after (a) removing rgl and re-installing
>>> from CRAN, (b) re-starting
>>> with a fresh installation of all of R 2.7.2.
>>> *System*:  Win XP Pro
>>>
>>> A vexing and persistent problem arose after I installed rgl_081.708 from
>>> R-Forge via
>>> install.packages("rgl",repos="http://R-Forge.R-project.org")
>>>
>>> Everything worked fine until the *first* time I tried to take a
>>> rgl.snapshot() of the current
>>> scene.
>>>  > rgl.snapshot("test.png")
>>> [1] "failed"
>>>
>>> OK, I did :
>>> remove.packages("rgl")
>>> install.packages("rgl")
>>> to get rgl_081 from CRAN
>>>
>>> However, after that, snapshot works, but all rgl.text -- axis labels,
>>> tick labels, plot
>>> annotations, etc. do not appear.
>>> E.g.: see
>>> http://euclid.psych.yorku.ca/SCS/Gallery/Test/iris3d-bad.jpg
>>> produced by:
>>>
>>> library(rgl)
>>> data(iris)
>>> col <-c("blue", "green", "red")[iris$Species]
>>> plot3d(iris[,1:3], type="s", size=0.4, col=col, cex=2, box=FALSE,
>>> aspect="iso")
>>> (There should be variable labels and tick labels for the axes.)
>>>
>>> I've now tried everything I can think of, *both* with R 2.7.2 and R 2.7.1
>>> - quitting and restarting R
>>> - uninstalling R, and re-installing a fresh copy, with all my old
>>> libraries (rgl_081)
>>> - reboot and power-down/restart
>>>
>>> The problem persists, and I don't know what to look for to try to track
>>> this down
>>> and fix it. Some questions:
>>> What might cause this to persist, even after reinstalling R?
>>> Could there be any interaction between rgl.dll and anything else on my
>>> system?
>>> Is anyone brave enough to see if this problem [with rgl_081.708] is
>>> reproducible?
>>> If not reproducible, then it is something on my system.  If it is, could
>>> there be
>>> a problem with the build process on R-Forge for building rgl with png
>>> support?
>>> I've contacted the package maintainer, but he has no suggestions.
>>>
>>> R> sessionInfo()
>>> R version 2.7.2 (2008-08-25)
>>> i386-pc-mingw32
>>>
>>> locale:
>>> LC_COLLATE=English_United States.1252;LC_CTYPE=English_United
>>> States.1252;LC_MONETARY=English_United
>>> States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252
>>>
>>> attached base packages:
>>> [1] stats     graphics  grDevices utils     datasets  methods   base
>>>
>>> other attached packages:
>>> [1] foreign_0.8-29 rgl_0.81       heplots_0.8-0  car_1.2-8
>>>
>>> loaded via a namespace (and not attached):
>>> [1] tools_2.7.2
>>> R>
>>>
>>>
>>> --
>>> Michael Friendly     Email: friendly AT yorku DOT ca
>>> Professor, Psychology Dept.
>>> York University      Voice: 416 736-5115 x66249 Fax: 416 736-5814
>>> 4700 Keele Street    http://www.math.yorku.ca/SCS/friendly.html
>>> Toronto, ONT  M3J 1P3 CANADA
>>>
>>> ______________________________________________
>>> 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.
>>>     
>>
>>
>>   
> 
>



More information about the R-help mailing list