[R] help with "persp" function

dxc13 dxc13 at health.state.ny.us
Sun Aug 31 04:55:58 CEST 2008


Yes, this works nicely. Thank you!


jholtman wrote:
> 
> Is this what you want to do:
> 
> x <- seq(from=1,to=3,by=.1)
> y <- seq(1,4,by=.1)
> z <- matrix(1, length(x), length(y))
> persp(x=x,y=y,z,zlim=c(0,2))
> 
> 
> On Sat, Aug 30, 2008 at 2:08 PM, dxc13 <dxc13 at health.state.ny.us> wrote:
>>
>> 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.
>>
>> ______________________________________________
>> R-help at r-project.org 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.
>>
> 
> 
> 
> -- 
> Jim Holtman
> Cincinnati, OH
> +1 513 646 9390
> 
> What is the problem that you are trying to solve?
> 
> ______________________________________________
> R-help at r-project.org 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.
> 
> 

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



More information about the R-help mailing list