Skip to content

errorbar

Plot data points with error bars.

h = errorbar(y, e)
h = errorbar(x, y, e)
h = errorbar(x, y, neg, pos, ...)

Plots (x, y) with vertical error bars. With one error-magnitude argument e, bars extend ±e. With two, neg and pos give asymmetric extents. Trailing name-value pairs control color, line style, and cap size.

errorbar(1:5, [10 12 11 13 12], [0.5 0.4 0.6 0.5 0.4])
  • plot — 2D line / marker plot.
  • scatter — 2D scatter plot with optional size and color encoding.