Financial Toolbox | ![]() ![]() |
Convert serial-date axis labels to calendar-date axis labels
Syntax
Arguments
Aksis |
(Optional) Determines which axis tick labels--x, y, or z--to replace. Enter as a string. Default = 'x' . |
DateForm |
(Optional) Specifies which date format to use. Enter as an integer from 0 to 17. If no DateForm 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. |
StartDate |
(Optional) Assigns 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-1999' assigns the date April 6, 1999 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 the MATLAB set
command for information on modifying the axis tick values and other axis parameters.
Examples
converts the x-axis labels to an automatically determined date format.
converts the y-axis labels to the month/day format.
converts the x-axis labels to the month/day/year format. The minimum x-tick value is treated as March 3, 1999.
See Also
bolling
, candle
, datenum
, datestr
, highlow
, movavg
, pointfig
![]() | cur2str | datedisp | ![]() |