[R] Plot 1:1 relationship
Greg.Snow at imail.org
Fri Jan 28 23:25:34 CET 2011
In addition you may want to include asp=1 and pty='s' to the plot command.
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
greg.snow at imail.org
> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of Sarah Goslee
> Sent: Friday, January 28, 2011 10:53 AM
> To: Peter Francis
> Cc: r-help at r-project.org
> Subject: Re: [R] Plot 1:1 relationship
> abline() takes the intercept and slope, which for a 1:1 relationship
> are 0 and 1, respectively.
> abline(0, 1)
> On Fri, Jan 28, 2011 at 10:42 AM, Peter Francis <peterfrancis at me.com>
> > Dear list,
> > I am looking to plot a line on a graph to show the 1:1 relationship,
> in order to demonstrate the pattern i have observed is off the line,
> however i am unsure. I have tried abline but i can not see a function
> to plot the 1:1?
> > Any help would be greatly appreciated
> > #generate data
> > y <- rnorm(30, mean=1.5, sd= 0.005)
> > x <- rnorm(30, mean=1.5, sd= 0.005)
> > plot(x,y)
> > Thanks,
> > Peter
> > ______________________________________________
> > 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-
> > and provide commented, minimal, self-contained, reproducible code.
> Sarah Goslee
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help