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!