What is the correct syntax to label Xticks with data from a cell array
6 ビュー (過去 30 日間)
古いコメントを表示
I'm trying to plot (bargraph) a column vector of numeric data (double) against site names along the X-axis. I just can't find the right syntax. Help a beginner please! A =
2
4
6
8
B =
'STP 0'
'STP 1'
'STP 3'
'STP 2'
0 件のコメント
回答 (2 件)
the cyclist
2011 年 3 月 10 日
bar([2 4 6 8])
B = {'STP 0','STP 1','STP 3','STP 2'}
set(gca,'XTickLabel',B)
Homework?
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!