How to plot a bar on a bar in a bar graph
Show older comments
Hi,
I would like to plot a bar graph, and then have a percentage of each bar "shaded out" or change color to indicated what percentage of this data passed a check.
The link below is a picture depicting what I would like to plot:
Thanks!
1 Comment
Kye Taylor
on 5 Jun 2013
Realize this can be done more easily using optional inputs to the bar function.
x=1:2;
y=[10 12];
new_y=[3,5];
bar(x,[y',new_y'],'stack')
Accepted Answer
More Answers (1)
Reeve
on 5 Jun 2013
0 votes
Categories
Find more on 2-D and 3-D Plots 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!