How to set x-axis labels under certain tick marks?
6 次查看(过去 30 天)
显示 更早的评论
Is there a simple way to define tick mark labels? For example I have attached a plot which I would like to change. Instead of having the default tick labels, I would like to programmatically put tick labels under the positions of 20,60,100,and 120 (and get rid of the numerical tick labels). At this point those positions would be consistent but in the future they may change.
0 个评论
采纳的回答
Image Analyst
2016-3-2
Try this:
ax = gca; % Get handle
ax.XTicks = [20,60,100,120]
ax.XTickLabel = {'','','',''} % Labels are null.
更多回答(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!