How to remove 'year' in the x-axis
Afficher commentaires plus anciens
Hi, I used the following command to make a plot. I don't wan to show the "year", but I got this plot. The x format is "datetime".

plot(x,y,'DateTimeTickFormat','MM/dd HH:mm')
Réponse acceptée
Plus de réponses (1)
Abby Skofield
le 20 Sep 2023
Déplacé(e) : Adam Danz
le 17 Oct 2023
Starting in MATLAB R2023b, you can add, remove, or update the secondary labels using the new functions xsecondarylabel, ysecondarylabel, zsecondarylabel.
t=datetime(2019,1,1,0,0:15:365*24*60-15,0);
plot(t,cumsum(randn(size(t))))
title('2019')
xsecondarylabel(Visible='off')
1 commentaire
Zhiyun
le 17 Oct 2023
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!


