Date on X-axis when zooming the plot

16 ビュー (過去 30 日間)
rank
rank 2011 年 10 月 5 日
回答済み: Viet Hung Nguyen 2016 年 8 月 14 日
I've plotted a file with 120,000 points. The x data is a time with a format 'MM/DD/YYYY HH:MM:SS' (10/30/2010 11:16:00 PM. I have successfully plotted it (though it took me 62 seconds to do it). My problem is when i zoom the plot, the datetick (x-axis) does automatically zooms in. In the whole plot, i only have 6 x-ticks, and when i zoom it in, the x-ticks is still the same. I've used datetick('x', 'mm/dd/yy HH:MM:SS', 'keepticks').
  2 件のコメント
Walter Roberson
Walter Roberson 2011 年 10 月 5 日
I am not clear as to what behavior you are looking for?
rank
rank 2011 年 10 月 5 日
Hi Walter. Thanks for responding. Typical plot shows the x and y axes with the tick labels. When you zoom in, the tick labels adjust. Example, when you have x tick values 2, 4, 6, 8 and 10. When you zoom in it (the tick labels) will automatically adjust. The plot may show 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, etc when you zoom it on 2-4.
What happened to my plot of 120K points is that when i zoom it in the tick labels does not adjust.
I hope i answered your question properly.

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

採用された回答

Aurelien Queffurust
Aurelien Queffurust 2011 年 10 月 5 日
You could try this submission : Intelligent Dynamic Date Ticks
DYNAMICDATETICKS is a wrapper function around DATETICK which creates dynamic date tick labels for plots with dates on the X-axis. The date ticks intelligently include year/month/day information on specific ticks as appropriate. The ticks are dynamic with respect to zooming and panning. They update as the timescale changes (from years to seconds). Data tips on the plot also show intelligently as dates.
  2 件のコメント
rank
rank 2011 年 10 月 5 日
Thanks Aurelien. Where can i download that? Sorry, I am new here. :)
Grzegorz Knor
Grzegorz Knor 2011 年 10 月 5 日
Just click link from first line :)

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

その他の回答 (1 件)

Viet Hung Nguyen
Viet Hung Nguyen 2016 年 8 月 14 日
Intelligent! Thanks Aurelien.

カテゴリ

Help Center および File ExchangeData Exploration についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by