How to query the date format when using dynamicDateTicks.m?

조회 수: 1 (최근 30일)
Chris L'Esperance
Chris L'Esperance 2020년 10월 12일
답변: Seth Furman 2020년 10월 15일
How can we query the date format when using dynamicDateTicks.m? The use case is dynamically displaying a corresponding date/time format in the axis label.

답변 (1개)

Seth Furman
Seth Furman 2020년 10월 15일
See my recommendation to use datetime data when plotting, related to your other question, here:
If you use datetime data, you can easily query the datetime format from the axes using the following functions
For example,
>> plot(datetime('today'):caldays:30*caldays+datetime('today'),1:31)
>> xfmt = xtickformat
xfmt =
'MMM dd'

카테고리

Help CenterFile Exchange에서 Dates and Time에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by