Geom.errorbar

Draw vertical and/or horizontal error bars.

Aesthetics

The x, ymin, ymax and/or y, xmin, xmax aesthetics must be defined. With the later a vertical error bar is drawn, and the former, a horizontal bar.

Examples

using Distributions

sds = [1, 1/2, 1/4, 1/8, 1/16, 1/32]
n = 10
ys = [mean(rand(Normal(0, sd), n)) for sd in sds]
ymins = ys .- (1.96 * sds / sqrt(n))
ymaxs = ys .+ (1.96 * sds / sqrt(n))

plot(x=1:length(sds), y=ys, ymin=ymins, ymax=ymaxs,
     Geom.point, Geom.errorbar)
x 0 1 2 3 4 5 6 -0.5 0.0 0.5 1.0 y