datxtick(Range,...)
datxtick(Ax,Range,...)
Ax
[ numeric ] - Handle to the axes object where the changes will be made; if not specified, the current axes object, gca()
, is changed.
Range
[ numeric ] - New date range to which the x-axis will be changed.
'datePosition='
[ 'start'
| 'centre'
| 'end'
] - Where within each given period the date tick will be placed (at the beginning of the period, in the middle of the period, or at the end of the period).
'dateTicks='
[ numeric | Inf
] - Individual date ticks; if Inf
, the ticks will be determined automatically using the standard Matlab algorithm.
See dat2str
for date formatting options available.
-IRIS Toolbox. -Copyright (c) 2007-2015 IRIS Solutions Team.
Create a graph plotting a quarterly series, and then change the ticks and labels on the x-axis to monthly:
x = tseries(qq(2010,1):qq(2011,4),@rand);
plot(x);
datxtick(mm(2010,1):mm(2011,12),'dateFormat=','Mmm YYYY');