File Exchange

image thumbnail

errorbarxy

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

13 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

Comments and Ratings (2)

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{:});

Updates

1.0.0.0

updated description

1.0.0.0

updated description

1.0.0.0

updated description

1.0.0.0

updated description

1.0.0.0

updated description

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

Discover Live Editor

Create scripts with code, output, and formatted text in a single executable document.


Learn About Live Editor