Message-ID: <b4b71e54-e9f7-4ea5-a8de-c850411a9ae5@w24g2000prd.googlegroups.com>
Date: 2009-02-27T06:26:08Z
From: Andrew
Subject: question about 3-d plot
In-Reply-To: <872ab6bf-0e49-4c34-adfe-2447a99f13b7@d36g2000prf.googlegroups.com>
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 <andrewjohnro... at gmail.com> 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(10000,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 <basu... at gmail.com> wrote:
>
>
>
> > 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? Can I get a
> > similar simulated scatter plot of points in 3 dimensions where the points
> > are clustered around a plane through the origin where the plane in question
> > is the 3-dimensional analogue of the 45 degree line through the origin?
>
> > Deepankar
>
> > ? ? ? ? [[alternative HTML version deleted]]
>
> > ______________________________________________
> > R-h... at r-project.org mailing listhttps://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
>
> ______________________________________________
> R-h... at r-project.org mailing listhttps://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.