Setting scale on timeplot

8 views (last 30 days)
Christian
Christian on 13 Jul 2013
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 Comment
dpb
dpb on 14 Jul 2013
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

Sign in to comment.

Answers (0)

Categories

Find more on Data Exploration in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!