FUNCTION REFERENCE
errorbar
Line plot with error bars.
Line plot with error bars.
Syntax
e = errorbar(y, err)Syntax
e = errorbar(x, y, err)Syntax
e = errorbar(x, y, neg, pos)Syntax
e = errorbar(x, y, yneg, ypos, xneg, xpos)Syntax
e = errorbar(..., ornt)Syntax
e = errorbar(..., linespec, Name, Value)Draws y against x with a bar from y-neg to y+pos at every point and a cap at each end. ornt works with every form: 'vertical' (default) draws the deltas as vertical bars, 'horizontal' as horizontal bars and 'both' as both. The six-input form draws both directions; there 'vertical' or 'horizontal' keeps only the bars of that direction. Matrix data gives one errorbar per column. Options: CapSize (points, default 6), Color, LineWidth, LineStyle and DisplayName. get and set work for XData, YData, YNegativeDelta, YPositiveDelta, XNegativeDelta, XPositiveDelta, CapSize, Color and LineWidth.
Example
e = errorbar([1 2 3], [2 4 3], [0.5 1 0.5]); get(e, 'CapSize') % 6Example
errorbar(1:3, [2 4 3], [1 1 1], 'horizontal');Example
e = errorbar([2 4 3], [0.5 1 0.5], 'both'); get(e, 'XNegativeDelta') % [0.5 1 0.5]Differences from MATLAB: cap lengths are fixed in data units for the default figure size when the chart is drawn, so they scale with zooming.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.