File Exchange

image thumbnail

errorbarxy

version 1.0.0.0 (106 KB) by Christopher Thissen
Plot error bars in x and y

4 Downloads

Updated 11 Feb 2016

GitHub view license on GitHub

errorbarxy plots errors in both x and y. Errors can be asymmetric and vary by point. No toolboxes required.
Usage is simple:
x = linspace(0,2,20);
y = sin(2*pi*x);
dx = 0.1*ones(size(x));
dy = 0.3*ones(size(x));
plot(x,y);
errorbarxy(x,y,dx,dy);

Additional examples here: https://github.com/cthissen/errorbarxy

Cite As

Christopher Thissen (2020). errorbarxy (https://github.com/cthissen/errorbarxy), GitHub. Retrieved .

Comments and Ratings (2)

Benjamin Friedrich

Works nicely.
I added whiskers for my errorbars:

plot(hAx,[x,x]'+0.2*[xMinus-x,xPlus-x]',[yMinus,yMinus]',lineSpec{:});
plot(hAx,[x,x]'+0.2*[xMinus-x,xPlus-x]',[yPlus,yPlus]',lineSpec{:});
plot(hAx,[xMinus,xMinus]',[y,y]'+0.2*[yMinus-y,yPlus-y]',lineSpec{:});
plot(hAx,[xPlus,xPlus]',[y,y]'+0.2*[yMinus-y,yPlus-y]',lineSpec{:});

Yonah Weiner

MATLAB Release Compatibility
Created with R2014b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!