boxline | R Documentation |
An alternative to boxplot
with lines connecting median and
quantiles of each box.
boxline(
x,
probs = c(0.75, 0.9, 0.99),
col.probs = 2L,
alpha = NULL,
col.med = 1L,
lwd.med = 2,
pch = NULL,
ylim = NULL,
err = c("none", "sd", "se", "ci", "quantile"),
err.alpha = 0.05,
col.err = col.med,
lwd.err = lwd.med,
at = seq_along(x),
add = FALSE,
limits = c(-Inf, Inf),
panel.first = NULL,
panel.last = NULL,
...
)
x |
a list of vectors |
probs |
a vector of probabilities; see |
col.probs |
a vector of colors for each |
alpha |
optional vector of opacity for each |
col.med, lwd.med |
color and line width used for median line |
pch |
optional plotting character used for the median point of each |
ylim |
the y-axis limits |
err |
optional error bars around each median value; possible values
are |
err.alpha |
the alpha level used when |
col.err, lwd.err |
color and line width used for error bars |
at |
a vector of x-coodinates for each element of |
add |
logical; if |
limits |
optional vector of length two with lower and upper limits for the error bars |
panel.first, panel.last |
expressions to be evaluated before or after plotting takes place |
... |
additional arguments passed to |
See boxplot
set.seed(1)
x <- lapply(0:10, function(x) rnorm(25, x / 2, sd = 0.5))
boxplot(x)
boxline(x, add = TRUE)
boxline(x, col.probs = c('red', 'orange', 'yellow'), alpha = 0.5,
pch = 16L, col.med = 'red')
boxline(x, probs = NULL, err = 'sd', add = TRUE, col.err = 'cyan')
boxplot(x, add = TRUE, axes = FALSE, col = 'transparent')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.