how to change axis to text format
Afficher commentaires plus anciens
How can I change x axis to months format
ex: Jan instead of 1, and Feb instead of 2

9 commentaires
Paresh yeole
le 3 Mai 2020
Use xticklabels
xticks(1:12)
xticklabels({'Jan','Feb','Mar',...)
Ibrahim AlZoubi
le 3 Mai 2020
Paresh yeole
le 3 Mai 2020
The vectors A,B,C are not of same length.
Size of vector B is 1*13.
Also, vector C is not defined correctly.
Ibrahim AlZoubi
le 3 Mai 2020
Ibrahim AlZoubi
le 3 Mai 2020
Ibrahim AlZoubi
le 3 Mai 2020
Paresh yeole
le 3 Mai 2020

It works:
plot(months,A)
hold on
plot(months,B)
plot(months,C)
xticks(1:12)
xticklabels({'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'})
Ibrahim AlZoubi
le 3 Mai 2020
Ibrahim AlZoubi
le 3 Mai 2020
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Annotations dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
