Assign (group-)labels to x-Axis in histogramm / bar chart
2 ビュー (過去 30 日間)
古いコメントを表示
Hello,
my data is arranged as a normal vector, whereas the values represent nominal groups. Hence I want to show the group-names instead of the normal x-scale:
data = [1;1;1;2;1;1;2;4;4;4;3;4;2];
xlabel = {'A';'B';'C';'D'}
[n,xout] = hist(data,4)
bar(xout,n)
xlim([1 4])
As you might guess, I wish to label the first bar (representing all 1's) 'A' and so on.
Can somebody give me a hint? THX
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!