Plot Dates and Durations
You can create plots of datetime and duration values with a variety of graphics functions.
You also can customize the axes, such as changing the format of the tick labels or
changing the axis limits.
Line Plot with Dates
Create a line plot with datetime values on the x-axis. Then, change the format of the tick
labels and the x-axis limits.
Create t as a sequence of dates and create y as random data. Plot the vectors using the
plot function.
t = datetime(2014,6,28) + calweeks(0:9);
y = rand(1,10);
plot(t,y);
Plot Dates and Durations