Plot property 'DateTimeTickFormat'
이전 댓글 표시
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!
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Axis Labels에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
