How to query the date format when using dynamicDateTicks.m?
1 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(1 个)
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'
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Dates and Time 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!