Plotting time series data but data rounding to minute

3 ビュー (過去 30 日間)
Jack Naumann
Jack Naumann 2018 年 5 月 29 日
回答済み: Peter Perkins 2018 年 6 月 4 日
Hi there,
I am plotting some time series data with the time data formatted as follows; '13/04/2018 01:00:49' However when I plot the data, it is appearing as per the attached image where all the data points appear to rounded to nearest minute ( or just the minute is plotted)
Anyone else come across this?
Thanks
Jack
  7 件のコメント
Jack Naumann
Jack Naumann 2018 年 5 月 29 日
No worries, I understood - I have a datetime array on the x-axis already.
I tried your code but got the same error message. I am running 2016a - could that be the issue?
Paolo
Paolo 2018 年 5 月 29 日
編集済み: Paolo 2018 年 5 月 29 日
Could be, you can try different formats and see what format it accepts. If you only wish to display the hours and minutes with not rounded values, try the following:
h1.Children.XAxis.TickValues = x;
h1.Children.XAxis.TickLabelFormat = 'HH:mm:ss';

サインインしてコメントする。

回答 (1 件)

Peter Perkins
Peter Perkins 2018 年 6 月 4 日
Jack, what is it that makes you think all the data have been rounded to the nearest minute? Certainly the tick labels are rounded (and thinned to every 10min), but that's just the ticks, not the data.
Which are you concerned about? You should be able to zoom in to see where the actual data are plotted.

カテゴリ

Help Center および File ExchangeGrid Lines, Tick Values, and Labels についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by