Skip to content

Example(persp) fails in 0.63.4 and 0.64 (PR#152)

1 message · Brian Ripley

#
persp> x <- seq(-10, 10, length = 50)

persp> y <- x

persp> f <- function(x, y) {
    r <- sqrt(x^2 + y^2)
    10 * sin(r)/r
}

persp> z <- outer(x, y, f)

persp> z[is.na(z)] <- 1

persp> par(bg = "white")

persp> persp(x, y, z, theta = 30, phi = 30, expand = 0.5, 
    col = "lightblue")
Error: plot.new has not been called yet

This is probably not a problem in 0.63.3 too, but example() is broken
there. (If I paste the lines it, it works in 0.63.3 but not 0.63.4).
The error appears to be in the internal code for persp. If plot.new
has been called it works as expected, so `make check' appears to work.