[R] how to draw a vertical line from points to x-axis
PAlspach at hortresearch.co.nz
Sun Sep 7 23:10:14 CEST 2008
Here's one way:
plot(0:10, 0:10, pch=16)
lines(rep(0:10, each=3), t(matrix(c(0:10, rep(c(0,NA), each=11)),
> -----Original Message-----
> From: r-help-bounces at r-project.org
> [mailto:r-help-bounces at r-project.org] On Behalf Of Anny Huang
> Sent: Monday, 8 September 2008 8:49 a.m.
> To: r-help at r-project.org
> Subject: [R] how to draw a vertical line from points to x-axis
> I want to know how to draw a line connecting each point to
> the x-axis perpendicularly (i.e. a vertical line).
> abline(v=...) seems not to work for my purpose, because it
> runs over the data point. Can anyone help? Thanks.
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
The contents of this e-mail are privileged and/or confidential to the named
recipient and are not to be used by any other person and/or organisation.
If you have received this e-mail in error, please notify the sender and delete
all material pertaining to this e-mail.
More information about the R-help