[R] plot3d crashes R

Ben Bolker bbolker at gmail.com
Tue Apr 12 20:17:03 CEST 2011


 <el.romaro <at> gmail.com> writes:

> 
> Hi Duncan,
> 
> I've just read the help for the plot3d function you've written 
> and tried out the example code given at the
> bottom of the page. I then modified the function by adding
>  an aspect ratio of 0.1 and ran it again, which
> crashed my R. I am using 2.12.2 on Windows, if that tells you anything.
> 

  Can you please:

(1) post the result of sessionInfo()
(2) post *exactly* the code that you ran -- e.g. was it

       open3d()
       x <- sort(rnorm(1000))
       y <- rnorm(1000)
       z <- rnorm(1000) + atan2(x,y)
       plot3d(x, y, z, col=rainbow(1000), aspect=0.1)

?

  This seems to make some kind of superficial sense, but it
doesn't really -- if you look inside aspect3d() [which is eventually
called by plot3d -> decorate3d] you'll see that it has no effect.
On the other hand, 

       plot3d(x, y, z, col=rainbow(1000), aspect=c(0.1,1,1))

gives a bounding box that is skinnier in the x-direction.

  Nevertheless, it shouldn't crash.

  My sessionInfo():

> sessionInfo()
R version 2.13.0 RC (2011-04-07 r55373)
Platform: i486-pc-linux-gnu (32-bit)

locale:
 [1] LC_CTYPE=en_US.utf8       LC_NUMERIC=C             
 [3] LC_TIME=en_US.utf8        LC_COLLATE=en_US.utf8    
 [5] LC_MONETARY=C             LC_MESSAGES=en_US.utf8   
 [7] LC_PAPER=en_US.utf8       LC_NAME=C                
 [9] LC_ADDRESS=C              LC_TELEPHONE=C           
[11] LC_MEASUREMENT=en_US.utf8 LC_IDENTIFICATION=C      

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] rgl_0.92.798

loaded via a namespace (and not attached):
[1] tools_2.13.0



More information about the R-help mailing list