How to remove 'year' in the x-axis
Mostrar comentarios más antiguos
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')
Respuesta aceptada
Más respuestas (1)
Abby Skofield
el 20 de Sept. de 2023
Movida: Adam Danz
el 17 de Oct. de 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 comentario
Zhiyun
el 17 de Oct. de 2023
Categorías
Más información sobre Annotations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


