How to remove 'year' in the x-axis
Mostra commenti meno recenti
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')
Risposta accettata
Più risposte (1)
Abby Skofield
il 20 Set 2023
Spostato: Adam Danz
il 17 Ott 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 Commento
Zhiyun
il 17 Ott 2023
Categorie
Scopri di più su Annotations in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


