how to change axis to text format
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Ibrahim AlZoubi
le 3 Mai 2020
Commenté : Ibrahim AlZoubi
le 3 Mai 2020
How can I change x axis to months format
ex: Jan instead of 1, and Feb instead of 2![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/289942/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/289942/image.png)
9 commentaires
Réponse acceptée
Ajay Kumar
le 3 Mai 2020
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 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Annotations dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!