Skip to content
Prev 181203 / 398502 Next

Axis Limits in Scatterplot3d

Alan wrote:
Well, I never designed anything to do that, but it is possible with the 
following function:


gets3dusr <- function(s3dobject){
     es3d <- environment(s3d$points3d)
     g3d <- function(name) get(name, envir=es3d)
     c(c(g3d("x.min"), g3d("x.max")) * g3d("x.scal"),
       c(0, g3d("y.max")) * g3d("y.scal") + g3d("y.add"),
       c(g3d("z.min"), g3d("z.max")) * g3d("z.scal"))
}


#Example:

s3d <- scatterplot3d(rnorm(5), rnorm(5), rnorm(5))
gets3dusr(s3d)


Uwe Ligges