I want to update x-axis limit of a TIMESERIES plot. However, using serial date numbers for minimum and maximum limits of the x-axis does not work. For example, I create a TIMESERIES plot:
b = timeseries(rand(1000,1), rand(1000,1)+[0:999]'); b.TimeInfo.StartDate = datestr( now );f1 = figure;plot(b);
Updating XLIM with the following:
xBegin = datenum(b.TimeInfo.StartDate,'dd-mmm-yyyy HH');xEnd = datenum(b.TimeInfo.StartDate,'dd-mmm-yyyy HH')+ 0.0417;xlim([xBegin xEnd])
incorrectly updates the x-axis limits.
Best Answer