[R] help with "persp" function

dxc13 dxc13 at health.state.ny.us
Sat Aug 30 20:08:11 CEST 2008


Dear List,

I am trying to draw a rectangular plane using the persp function, however I
can't seem to get it to work. I want the length along x1 axis to be between
1 and 3 and the length along the x2 axis to be between 1 and 4.  All z
values for x1 should be equal (say, z=1) because this is a plane, not a
cube.  Below is my current code.  Any help is appreciated
Thanks in advance

dxc13

x <- seq(from=1,to=3,by=.1)
y <- seq(1,4,by=.1)
f <- array(1,dim=c(21,1))
z <- as.matrix(cbind(x,y,f))
persp(x=x,y=y,z)

-- 
View this message in context: http://www.nabble.com/help-with-%22persp%22-function-tp19235739p19235739.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list