Dear all,

I would like to put two perspective plots into one plot. The help page
for ?persp shows how one can add points and lines but not another
perspective plot.

data(volcano)
z <- 2 * volcano        # Exaggerate the relief
x <- 10 * (1:nrow(z))   # 10 meter spacing (S to N)
y <- 10 * (1:ncol(z))   # 10 meter spacing (E to W)
## Don't draw the grid lines :  border = NA
persp(x, y, z, theta = 135, phi = 30, col = "green3", scale = FALSE,
     ltheta = -120, shade = 0.75, border = NA, box = FALSE)

and now I would like to include another surface. I was hoping for a
possibility like add=TRUE such as in contour:

persp(x, y, z+10, theta = 135, phi = 30, col = "red", add=TRUE)

Can someone point out to me how it can be accomplished (maybe a function in
another package)?

Thank you very much,
Roland

        [[alternative HTML version deleted]]

______________________________________________
[email protected] 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.

Reply via email to