www.gusucode.com > graphics 案例源码程序 matlab代码 > graphics/SpecifyDateFormatForxAxisTickLabelsExample.m
%% Specify Tick Label Format for _x_-Axis with Dates % Create a line plot with datetime values along the _x_-axis. Then, change % the format of the dates. t = datetime(2014,6,28) + caldays(1:10); y = rand(1,10); plot(t,y); xtickformat('MM-dd')