Setting scale on timeplot
8 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentar
dpb
am 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
Antworten (0)
Siehe auch
Kategorien
Mehr zu Data Exploration finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!