Setting scale on timeplot
8 ビュー (過去 30 日間)
古いコメントを表示
Hi, I have a vector with pressure vaues for every 10 seconds that I ploted in a timeline for a specific date. It works all fine but my time axis is labled, depending on the zoom level, with timesteps outside the used time period. For instance 05/ 16:00:34. My problem is to get labels for different scales only with a time label within the 10 second timestep. Here you find my code. I appreciate any help:)
x = vector;
ts1 = timeseries(x,1:10:(numel(x)*10));
ts1.Name = 'Pressure';
ts1.TimeInfo.Units = 'seconds';
ts1.TimeInfo.StartDate='05-Jul-2013 16:00:00' % Set start date.
ts1.TimeInfo.Format = 'dd/ HH:MM:SS' % Set format for display on x-axis.
ts1.Time=ts1.Time-ts1.Time(1); % Express time relative to the start date.
plot(ts1)
1 件のコメント
dpb
2013 年 7 月 14 日
That's dependent on how you do the zoom and set the limits and tick values in callback functions.
You'll have to write a callback function that limits the range of the axes during the zoom to not exceed the end values.
doc zoom % to see callback functions spec's, examples
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Data Exploration についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!