Description Usage Arguments Examples
add a single error bar to a plot
1 |
x |
x coordinate |
y |
y coordinate - a point gets drawn there |
ll |
lower limit - position of the lower whisker |
ul |
upper limit - position of the upper whisker |
width |
width of the whisker ends |
1 2 3 4 5 6 7 8 9 10 11 12 13 | #single:
plot(NULL, xlim = c(0, 2), ylim = c(0, 5))
error_bar(1, 2.5, 1, 4.5, 1)
#multiple:
percentile <- do.call('rbind', lapply(list(c(1:4), c(2:5), c(3:6)), quantile))
plot(NULL, xlim = c(0, 4), ylim = c(0, 7))
lapply(seq_len(nrow(percentile)),
FUN = function(x) error_bar(x,
percentile[x, 3],
percentile[x, 2],
percentile[x, 4],
width = 0.5))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.