how to change axis to text format
3 次查看(过去 30 天)
显示 更早的评论
How can I change x axis to months format
ex: Jan instead of 1, and Feb instead of 2
9 个评论
采纳的回答
Ajay Kumar
2020-5-3
Use xticklables for eg:
x = linspace(0,12);
y = x.^2;
plot(x,y)
xticks([0:1:12])
xticklabels({'','Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'})
5 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Characters and Strings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!