How to draw the multiple bar chart through matlab?
조회 수: 11 (최근 30일)
이전 댓글 표시
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/315906/image.png)
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!