Qu

errorbar

Builtin index · Plotting

errorbar(x, y, yerr)

Input: x, y, yerr · Output: no output

What it is

Draws one capped whisker plus a marker per sample: x, y, yerr are equal-length numeric Vecs, yerr the (symmetric) half-height of each whisker in data units. For uncertainty bars on top of a scatter/bar/line plot.

Overloads

One call shape — this function is not overloaded.

CodeInputOutputDescription
errorbar(x, y, yerr)
x Vecnot documented yet
y Vecnot documented yet
yerr Vecnot documented yet
no outputFor uncertainty bars on top of a scatter/bar/line plot.

Examples

From the documentation, and run by the build -- the output and the figure below are what the engine actually produced. Simplest first.

x = 0 to 9
y = sin(x / 2)
figure()
errorbar(x, y, 0.1 * ones(10))
figure()
fill_between(x, y - 0.2, y + 0.2)
figure()
bubble(x, y, abs(y) * 20 + 5)
figure()
donut([30, 20, 50], "a", "b", "c")
figure()
pie([30, 20, 50], "a", "b", "c")
a (30%) b (20%) c (50%)

from plotting

How it works

errorbar(x, y, yerr) — one capped whisker + marker per sample, for uncertainty on a scatter/bar/line plot.

From the note above this builtin in the interpreter, where the reasoning was written down as it was built.