In 2016b is there a way to get categories on the x-axis of a bar chart?
조회 수: 1 (최근 30일)
이전 댓글 표시
I have seen how to do it on the 2017 release, but wondered if there was a way to get categories on the x-axis of a bar chart as opposed to just numbers on the 2016b release?
댓글 수: 0
채택된 답변
Mishaal Aleem
2017년 6월 28일
Here is a simple example applied to a bar chart.
x = [1,2,3,4,5];
y = [3,5,6,7,2];
bar(x,y);
labels = {'A', 'B', 'C', 'D', 'E'}; % Labels to use on x-axis
xticklabels(labels);
댓글 수: 0
추가 답변 (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!