errorbar(x, y, xerr = NULL, yerr = NULL,
bar.col = "red", bar.len = 0.01,
grid = TRUE, with = TRUE, add = FALSE, ...)
plot
function.errorbar
plots y
versus x
with symmetric error bars,
with a length determined by xerr
resp. yerr
in x- and/or
y-direction. If xerr
or yerr
is NULL
error bars in
this direction will not be drawn. A future version will allow to draw unsymmetric error bars by specifying
upper and lower limits when xerr
or yerr
is a matrix of
size (2 x length(x))
.
plotrix::plotCI
, Hmisc::errbar
x <- seq(0, 2*pi, length.out = 20)
y <- sin(x)
xe <- 0.1
ye <- 0.1 * y
errorbar(x, y, xe, ye, type = "l", with = FALSE)
cnt <- round(100*randn(20, 3))
y <- apply(cnt, 1, mean)
e <- apply(cnt, 1, sd)
errorbar(1:20, y, yerr = e, bar.col = "blue")
Run the code above in your browser using DataLab