How to remove 'year' in the x-axis
Ältere Kommentare anzeigen
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')
Akzeptierte Antwort
Weitere Antworten (1)
Abby Skofield
am 20 Sep. 2023
Verschoben: Adam Danz
am 17 Okt. 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 Kommentar
Zhiyun
am 17 Okt. 2023
Kategorien
Mehr zu Annotations finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


