Bar Chart with Error Bars
by Martina Callaghan
04 Mar 2011
(Updated 15 Nov 2011)
This is a very simple extension of MatLab's bar function to add error bars.
|
Watch this File
|
| File Information |
| Description |
This acts in the same way as MatLab's bar function but with an additional first parameter containing the errors on the y values.
The y values are plotted using MatLab's bar function.
The x values are determined from the bar plot and used with MatLab's errorbar function to add errorbars to the bar chart that are centred on the column.
Adding an extra dimension to the errors allows for asymmetric errors. |
| MATLAB release |
MATLAB 7.11 (2010b)
|
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Updates |
| 12 Aug 2011 |
Now accounts for the fact that if x-values are also supplied, they may not be in ascending order. |
| 24 Oct 2011 |
This version allows for asymmetric errors as requested. |
| 15 Nov 2011 |
Now allows asymmetric errors on 1D data. |
|
Contact us at files@mathworks.com