barwitherr(errors,v​arargin)

This is a very simple extension of MatLab's bar function to add error bars.
27K Downloads
Updated 3 Jun 2018

View License

Released Code; update to draw graphics immediately.

Cite As

Martina Callaghan (2024). barwitherr(errors,varargin) (https://www.mathworks.com/matlabcentral/fileexchange/30639-barwitherr-errors-varargin), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2010b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Errorbars in Help Center and MATLAB Answers
Acknowledgements

Inspired: superbar

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.12.0.0

Bug fix to update graphics for multiple plots on same figure. Otherwise the error bars overlay on each other instead of being bar-specific for the second group.
Added compatibility with 2014b graphics

1.11.0.0

Errors always defined in terms of upper and lower, even if symmetric.

1.10.0.0

Recent comments addressed via bug fix, appearance update and extra optional output parameter.

1.9.0.0

Only return handle if requested.

1.8.0.0

Returns handle as recommended by Eric in submission comments

1.7.0.0

Bug fix: xOrder should be specified when second argument for standard bar function is a width/property.

1.6.0.0

Now allows asymmetric errors on 1D data.

1.3.0.0

This version allows for asymmetric errors as requested.

1.2.0.0

Now accounts for the fact that if x-values are also supplied, they may not be in ascending order.

1.0.0.0