Setting scale on timeplot

8 visualizzazioni (ultimi 30 giorni)
Christian
Christian il 13 Lug 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 Commento
dpb
dpb il 14 Lug 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

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Data Exploration in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by