Re: [R] plot curve on surface

2012-08-24 Thread David Winsemius
On Aug 24, 2012, at 2:34 AM, Michael Meyer wrote: Greetings, I would like to plot a curve (in color red) on a surface in a 3D plot. Say x <- as.vector(seq(-1,1,0.2)) dim(x) <- c(length(x),1) y <- as.vector(seq(-1,1,0.2)) dim(y) <- c(1,length(y)) z <- x%*%y # (x_

Re: [R] plot curve on surface

2012-08-24 Thread S Ellison
> I would like to plot a curve (in color red) on a surface in a 3D plot. Perhaps trans3d would be relevant? ?persp 's examples include an example of adding a line to a 3d plot using trans3d S *** This email and any attachments are

[R] plot curve on surface

2012-08-24 Thread Michael Meyer
Greetings, I would like to plot a curve (in color red) on a surface in a 3D plot. Say     x <- as.vector(seq(-1,1,0.2))     dim(x) <- c(length(x),1)     y <- as.vector(seq(-1,1,0.2))     dim(y) <- c(1,length(y))         z <- x%*%y # (x_iy_j) # 3D plot of z(x,y)=xy: persp(x,y,z