Hii I am trying to plot lines at (0,0) axis where my scatterplot goes between positive n negative values for x and y axis i can plot point using points(0,0) but if i want to draw lines along it, can't seem to get it right Mohan
plot lines at 0,0 axis
4 messages · Mohan Singh, David Winsemius, Patrick Connolly +1 more
x<- rnorm(100)
> y <- rnorm(100) > plot(x,y) > abline(h=0) > abline(v=0) > box(col="grey")
On Mar 16, 2009, at 3:55 PM, Mohan Singh wrote:
Hii I am trying to plot lines at (0,0) axis where my scatterplot goes between positive n negative values for x and y axis i can plot point using points(0,0) but if i want to draw lines along it, can't seem to get it right Mohan
______________________________________________ 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.
David Winsemius, MD Heritage Laboratories West Hartford, CT
Quoting Mohan Singh <Mohan.Singh at ucd.ie>:
Hii I am trying to plot lines at (0,0) axis where my scatterplot goes between positive n negative values for x and y axis i can plot point using points(0,0) but if i want to draw lines along it, can't seem to get it right
?abline maybe abline(h = 0) abline(v = 0) HTH
Mohan
______________________________________________ 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.
"PaCo" == p connolly <p_connolly at slingshot.co.nz>
on Tue, 17 Mar 2009 10:42:49 +1300 writes:
PaCo> Quoting Mohan Singh <Mohan.Singh at ucd.ie>:
>> Hii
>>
>> I am trying to plot lines at (0,0) axis where my scatterplot goes
>> between positive n negative values for x and y axis
>>
>> i can plot point using points(0,0) but if i want to draw lines
>> along it, can't seem to get it right
PaCo> ?abline
PaCo> maybe abline(h = 0)
PaCo> abline(v = 0)
Yes. And one abline() call is sufficient :
abline(h = 0, v = 0)
Martin Maechler, ETH Zurich