Error bars on grouped bar plot
Show older comments
Hi, I would like to place error bars for the following grouped bar plot. I tired different solution on the web but couldn't find the one that worked... Any help would be appreciated! Thanks

1 Comment
Kien Nguyen
on 20 Dec 2019
Hi Jahnathan,
I am trying to plot bar chart like your image, but I do not know how to read the bar values and error values from the excel file. For example:
1 1.1 1.3 1.5 1.8 0.2 0.23 0.4 0.3
2 1.5 1.2 1.6 2.0 0.22 0.27 0.34 0.2
3 1.4 1.9 1.0 1.5 0.26 0.18 0.2 0.25
Here x = column 1 (1, 2, 3)
y = columns 2, 3, 4 (1.1 1.3 1.5 1.8
1.5 1.2 1.6 2.0
1.4 1.9 1.0 1.5
and error bars = columns 5,6,7
Do you know how to read these data to plot bar chart?
Thanks,
Kevin
Accepted Answer
More Answers (1)
Mary Rezaee
on 21 Jul 2019
0 votes
Hi everyone. Thanks for your helpful answers. I tried your code ‘Star Strider’, but I ran into a problem. “XOffset” doesn’t exist! While reaching that line of the code, I get an error which says no appropriate method, property of field “XOffset” for class ‘matlab.graphics.chart.primitive.Bar’ I am using Matlab R2017. Any help would be really appreciated.
1 Comment
Kien Nguyen
on 20 Dec 2019
Hi,
Anyone can help me. I am a beginner.
I want to plot bar chart like Johnathan's image, but I do not know how to read the bar values and error values from the excel file. For example:
1 1.1 1.3 1.5 1.8 0.2 0.23 0.4 0.3
2 1.5 1.2 1.6 2.0 0.22 0.27 0.34 0.2
3 1.4 1.9 1.0 1.5 0.26 0.18 0.2 0.25
Here x = column 1 (1, 2, 3)
y = columns 2, 3, 4 (1.1 1.3 1.5 1.8
1.5 1.2 1.6 2.0
1.4 1.9 1.0 1.5
and error bars = columns 5,6,7
Do you know how to read these data to plot bar chart?
Thanks,
Kevin
Categories
Find more on Annotations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!