How to hide representative duration at datetime X-axis plot?
古いコメントを表示
How to remove/hide representative duration at datetime X-axis plot under auto-mode condition(XTickLabelMode)?


採用された回答
その他の回答 (2 件)
Ameer Hamza
2020 年 10 月 8 日
編集済み: Ameer Hamza
2020 年 10 月 8 日
You can do it by running the following statements.
ax = gca;
ax.XTickLabel = ax.XTickLabel;
or
ax = gca;
ax.XTickLabelMode = 'manual';
4 件のコメント
Euigyeong Hong
2020 年 10 月 8 日
Ameer Hamza
2020 年 10 月 8 日
There does not seem to be a documented way.
Euigyeong Hong
2020 年 10 月 8 日
Ameer Hamza
2020 年 10 月 8 日
I think for normal visualization, when you need to zoom on the axes, the date might not be an issue. Just turn it off when printing or saving the image.
Seth Furman
2020 年 10 月 12 日
編集済み: Seth Furman
2020 年 10 月 12 日
If you just want the duration data for the time of day on the x-axis, you can use the timeofday method for datetime.
>> x = datetime('today'):hours(1):datetime('today')+hours(10);
>> y = 0:10;
>> plot(timeofday(x),y)
>> xtickformat('hh:mm')

1 件のコメント
Euigyeong Hong
2020 年 10 月 12 日
編集済み: Euigyeong Hong
2020 年 10 月 12 日
カテゴリ
ヘルプ センター および File Exchange で Graphics Object Properties についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

