| Financial Toolbox | Search  Help Desk |
| dateaxis | Examples See Also |
Convert serial-date axis labels to calendar-date axis labels.
Syntax
dateaxis(aksis, dateform, startdate) dateaxis(aksis, dateform) dateaxis(aksis) dateaxis
Arguments
aksis= 'x'.dateformdateform argument is entered, this function determines the date format based on the span of the axis limits. For example, if the difference between the axis minimum and maximum is less than 15, the tick labels are converted to three-letter day-of-the-week abbreviations (dateform = 8). See dateform format descriptions below.
startdateAssigns the date to the first axis tick value. Enter as a string. The tick values are treated as serial date numbers. The default startdate is the lower axis limit converted to the appropriate date number. For example, a tick value of 1 is converted to the date 01-Jan-0000. Entering startdate as '06-apr-1995' assigns the date April 6, 1995 to the first tick value and the axis tick labels are set accordingly.
Description
dateaxis(aksis, dateform, startdate)
replaces axis tick labels with date labels on a graphic figure.
See Using MATLAB Graphics for information on using set to modify the axis tick values and other axis parameters.Examples
dateaxis('x') or dateaxis
converts the x-axis labels to an automatically determined date format.
dateaxis('y', 6)
converts the y-axis labels to the month/day format.
dateaxis('x', 2, '03/03/1995')
converts the x-axis labels to the month/day/year format. The minimum x-tick value is treated as March 3, 1995.
See Also
bolling, candle, datenum, datestr, highlow, movavg, pointfig