Keeping xlabels but not xticks
1 回表示 (過去 30 日間)
古いコメントを表示
Hi there,
See image: I would like to keep the xlabels (M1,M2,M3,M4,All) whilst deleting the xticks. How do I do this?
Thanks

0 件のコメント
回答 (1 件)
Adam
2017 年 3 月 9 日
hAxes.XAxis.TickLength = [0 0];
where hAxes is your axes handle. This assumes you are using a sufficiently recent version of Matlab (R2015b or later)
2 件のコメント
Adam
2017 年 3 月 9 日
figure; hAxes = gca;
plot( hAxes, rand( 1, 100 ) )
hAxes.XAxis.TickLength = [0 0];
seems to work fine in R2016a. I don't have R2017, but I don't see why it shouldn't work there also.
参考
カテゴリ
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!