LABELLING PLOTS IN MATLAB
16 ビュー (過去 30 日間)
古いコメントを表示
I want to label my x-axis plot as three months June, July and August. I am plotting datasets against months , how do i label the x-axis
0 件のコメント
回答 (1 件)
Ameer Hamza
2020 年 11 月 13 日
If you have numeric values on x and y axis, you can set the xticklabels
x = linspace(1, 3);
y = rand(size(x));
plot(x, y);
xticks([1 2 3])
xticklabels({'June', 'July', 'August'})
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Axis Labels についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!