Skip to content
Prev 319231 / 398506 Next

vertical lines in R plot

Also, type="h", in plot(), points(), or lines() draws vertical line segments between (x,y)
and (x,0).  E.g.,
     points(x=c(5.0,5.5,6), y=c(0.12,0.60,0.20), type="h")
does the same as
   segments(x0=c(5.0,5.5,6), y0=c(0,0,0), x1=c(5.0,5.5,6), y1=c(0.12,0.60,0.20))

Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com