Re: [R] Simple 3D Plot Question

2010-06-15 Thread Duncan Murdoch
Nick Torenvliet wrote: Hi all, I've got a simple 3D plot as follows... xx <- seq(-20,20,.5) yy <- seq(-20,20,.5) zFunc <- function(x,y){3*x^2*y} z <- outer(xx,yy,zFunc) persp(xx,yy,z,theta=30,phi=30,ticktype="detailed") Just beautiful! My question is how do I constrain the plot to o

[R] Simple 3D Plot Question

2010-06-15 Thread Nick Torenvliet
Hi all, I've got a simple 3D plot as follows... > xx <- seq(-20,20,.5) > yy <- seq(-20,20,.5) > zFunc <- function(x,y){3*x^2*y} > z <- outer(xx,yy,zFunc) > persp(xx,yy,z,theta=30,phi=30,ticktype="detailed") Just beautiful! My question is how do I constrain the plot to only display x^2 <= y <= 1