overlay bar plot without mixing color
Show older comments
I would like to create a bar plot with overlaying bars of different colours.
I tried using FaceAlpha but this alters the colours.
Basically, I would like my plot to look like a stacked bar colour wise, but like an ovelayed bar in terms of the values.
This is the simplified code and result of what I have tried:
A = [1;5;3;7;4];
B = [3;2;4;8;2];
figure;
bar(A, 'FaceColor', 'b', 'FaceAlpha',0.5)
hold on
bar(B, 'FaceColor', 'y', 'FaceAlpha',0.5)
hold off

How can I overlay my bars in a way that they show the colour I defined instead of mixing them to this weird muddy green in the overlaying bits?
Accepted Answer
More Answers (0)
Categories
Find more on Networks 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!