Last chance! 50% off unlimited learning
Sale ends in
x
and a matrix y
,
draws thin vertical lines connecting limits represented by columns of
y
beyond the first. It is assumed that either (1) the second
and third columns of y
represent lower and upper confidence
limits, or that (2) there is an even number of columns beyond the
first and these represent ascending quantiles that are symmetrically
arranged around 0.5.
multLines(x, y, pos = c('left', 'right'), col='gray', lwd=1, lty=1, lwd.vert = .85, lty.vert = 1, alpha = 0.4, grid = FALSE)
x
elementspos='left'
the vertical lines are drawn, right
to left, to the left of the point (x, y[,1)
. Otherwise lines
are drawn left to right to the right of the point.(x, y[,1])
pairs. The same
color but with transparency given by the alpha
argument is
used to draw the vertical linesTRUE
when using grid
/lattice
x <- 1:4
y <- cbind(x, x-3, x-2, x-1, x+1, x+2, x+3)
plot(NA, NA, xlim=c(1,4), ylim=c(-2, 7))
multLines(x, y, col='blue')
multLines(x, y, col='red', pos='right')
Run the code above in your browser using DataLab