How to avoid overlap of tick mark label strings generated by dynamicDateTicks.m?
3 次查看(过去 30 天)
显示 更早的评论
Is there a way to avoid overlapping tick mark label strings generated by dynamicDateTicks.m?
As an example, afigure consuming 1/2 of the screen, has roughly 11 tick marks. Use of the function dynamicDateTicks.m has resulted in values of the form HH:MM largely, however, the series does span multiple days - some of the tick mark labels are formatted in mm/dd HH:MM. These are long, and run into the other labels.
Possible solutions are of course adjusting aspect ratio or reducing the number of tickmarks.
It would be great to know if dynamicDateTicks.m had a mechanism to handle this.
0 个评论
回答(1 个)
Seth Furman
2020-10-15
编辑:Seth Furman
2020-10-15
Consider using datetime arrays for your data when plotting. The default behavior includes tick labels that automatically update similar to the dynamicDateTicks.m File Exchange submission.
See the following documentation page for information on converting datenum arrays to datetime arrays.
Alternatively, consider rotating your axis labels to avoid overlapping.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!