How to draw the multiple bar chart through matlab?
15 次查看(过去 30 天)
显示 更早的评论
I want to draw the multiple bar cgarts between bit rates and A,B,C,D,E and F
0 个评论
回答(1 个)
Sujay C Sharma
2020-6-15
Hi,
Here is an example of how you can use the bar function to display bar charts of multiple variables with respect to a single variable.
data = [randi([1 3], 5, 1) randi([1 3], 5, 1) randi([1 3], 5, 1) randi([1 3], 5, 1) randi([1 3], 5, 1)];
x = (1:5)';
multibar = bar(x,data);
set(multibar(1), 'FaceColor','r')
set(multibar(2), 'FaceColor','b')
set(multibar(3), 'FaceColor','g')
set(multibar(4), 'FaceColor', 'y')
set(multibar(4), 'FaceColor', 'w')
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Bar Plots 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!