Smaller values not seen in bar graph
Show older comments
Hi, I want to show boundaries of two variables in bar graph. However, when I add second variable to bar graph, smaller value of first value disappear in bar graph (such as y=7, y=8). I didnt find way to make it appears.
X=[5 4 3];
Y=[1 7 8];
bar(X)
hold on
bar(Y)
Accepted Answer
More Answers (1)
You can go ahead like this right?
X=[5 4 3];
Y=[1 7 8];
x = 1:3 ;
bar(x,[X;Y])
Or you can try:
bar([X' Y'],'stacked')
1 Comment
Gokhan Kayan
on 6 Dec 2021
Categories
Find more on Graph and Network Algorithms 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!





