Hi,
I've search for an answer to my question but I still cannot get this to work. I am trying to plot data on a figure with the date on the x-axis. My problem is that the figure extends beyond the x-axis limits, even if I am using 'keeplimits'. The figure keeps showing an x-axis extending from May 11 to Oct 24 instead of the May 20 to Oct 22
t = datetime(2009,05,19) + caldays(1:156);
Ya = plot (t, wtddata(:,1),'-','LineWidth',2);
hold on; Yb = plot (t, wtddata(:,2),'-','LineWidth',2); hold off;
datetick('x','mmm','keeplimits')
Any help would be appreciated.
Thanks
Best Answer