Reputation: 1195
I want to draw a bar with error bounds like this http://www.mathworks.ch/matlabcentral/fileexchange/9377-barerror. There are many scripts to do this around that combine bar() and errorbar(). But all I found can only deal with symmetric errors. Can anyone show me how to add asymmetric error bounds like errorbar(X,Y,L,U) but on bar, not on curve? Thanks.
Upvotes: 1
Views: 3500
Reputation: 5893
You can plot errorbars over your bar chart:
data = 1:10;
eH = rand(10,1);
eL = rand(10,1);
figure;
hold all;
bar(1:10, data)
errorbar(1:10, data, eL, eH, '.')
Upvotes: 4