Anny 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)), ncol=3))) HTH .... Peter Alspach > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Anny Huang > Sent: Monday, 8 September 2008 8:49 a.m. > To: r-help@r-project.org > Subject: [R] how to draw a vertical line from points to x-axis > > Hello, > > 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. > > Anny > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@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. > 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. ______________________________________________ R-help@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.