Plot property 'DateTimeTickFormat'
Afficher commentaires plus anciens
Hi,
I've just discovered this property of plot function and I set a Format but I noticed some differences compared to default plot when no 'DateTimeTickFormat' is specified.
plot1Objs(2) = plot(app.plantActivePowerUIAxes, t, yPLANTMW);

plot1Objs(2) = plot(app.plantActivePowerUIAxes, t, yPLANTMW,'DateTimeTickFormat','yyyy-MMM-dd hh:mm a');

In default mode, the date only appears once if the range fits in a single day and minutes and seconds appears if I zoom in, which I really like. If I specify my own Format , the plot does not adjust as I zoom and I end up with 5 identical ticks. Is there a way to enter the Format so it behaves the same way? I couldn't figure it out with the documentation.
Also, the cursor still shows the default plot function datetime Format . Is there anything I can do about it?
A patch directly in the plot function would be an acceptable solution as well since the format I choose will never change for my application.
Thank you!
1 commentaire
Alexandre
le 17 Jan 2023
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Axis Labels 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!
