[R] Bug in persp?

Paul Smith phhs80 at gmail.com
Wed Sep 24 15:24:21 CEST 2008


Dear All,

I am not sure whether the following can be considered a bug:

> x <- seq(-1,1,length=20)
> y <- x
> z <- matrix(1,20,20)
> persp(x,y,z)
Error in persp.default(x, y, z) : invalid 'z' limits

It works with:

persp(x,y,z,zlim=c(0,1.5))

Should not persp set the z limits by default when the matrix to draw
is constant?

Paul



More information about the R-help mailing list