Skip to content
Prev 155407 / 398506 Next

how to draw a vertical line from points to x-axis

I think you want the ?lines function.

To connect a point (x,y) to the x-axis,

lines(x=c(x,x),y=c(y,0))

...draws a line from that point to the x-axis. You may also want to specify
pch=c(?,""),type="b" where ? is the original point type (which you don't
want to "run over") and "" is the pch for theline on the axis.

--Adam
On Sun, 7 Sep 2008, Anny Huang wrote: