Setting scale on timeplot

8 次查看(过去 30 天)
Christian
Christian 2013-7-13
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
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 CenterFile Exchange 中查找有关 Data Exploration 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by