Dates beside the axis when plotting datetime
古いコメントを表示
I'm trying to plot changes on a specific date of a long intraday data, and want to show (1) only the time and erase the date which appears beside the axis, or (2) change the language of the date beside the axis.

2 件のコメント
Walter Roberson
2020 年 9 月 22 日
There is a private property named ScaleFormat_I that is under the XAxis property of the axes.
Unfortunately, it does not appear to be possible to set the property, and the details of constructing datetime rulers is hidden inside a .p file toolbox/matlab/graphics/axis/+matlab/+graphics/+axis/+decorator/DatetimeRuler.p
Benjamin Kraus
2024 年 4 月 26 日
編集済み: Benjamin Kraus
2024 年 4 月 26 日
@Walter Roberson: Starting in R2024a, the ScaleFormat_I property has been replaced by a documented (and wirtable) SecondaryLabelFormat property.
採用された回答
その他の回答 (1 件)
Seth Furman
2020 年 10 月 21 日
1) The date information can be hidden by setting the TickLabelsMode to 'manual' on the DatetimeRuler.
ax = gca;
ax.XAxis.TickLabelsMode = 'manual';
2) The default input locale for datetimes can be changed in the Preferences dialog box (i.e. Preferences > Command Window > Datetime format > Locale).
カテゴリ
ヘルプ センター および File Exchange で Dates and Time についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
