Re: [R] question about 3-d plot

2009-02-27 Thread Tony Breyal
Hi Deepankar The code on the following page looks kind of cool, and also seems to produce something of the type of graph you are after perhaps: https://r-forge.r-project.org/plugins/scmsvn/viewcvs.php/pkg/rgl/demo/regression.r?rev=702&root=rgl&sortby=date&view=auto [below is a copy of the code...

Re: [R] question about 3-d plot

2009-02-26 Thread andrew
actually, I just realised you also want a line in the plot. I am not super-sure how to do this. On Feb 27, 5:20 pm, andrew wrote: > the following should work > > library(lattice) > x <- seq(1,100) > y <- seq(1,100) > gr <- expand.grid(x,y) > gr$z <- x + y + rnorm(1,0,100) > cloud(z ~ x + y,

Re: [R] question about 3-d plot

2009-02-26 Thread andrew
the following should work library(lattice) x <- seq(1,100) y <- seq(1,100) gr <- expand.grid(x,y) gr$z <- x + y + rnorm(1,0,100) cloud(z ~ x + y, data = gr) also, look for the package rgl which does similar but with more possiblities. On Feb 27, 4:28 pm, Dipankar Basu wrote: > Hi R Users, >

[R] question about 3-d plot

2009-02-26 Thread Dipankar Basu
Hi R Users, I have produced a simulated scatter plot of y versus x tightly clustered around the 45 degree line through the origin with the following code: x <- seq(1,100) y <- x+rnorm(100,0,10) plot(x,y,col="blue") abline(0,1) Is there some way to generate a 3-dimensional analogue of this? C