Financial Toolbox
  Go to function:
    Search    Help Desk 
dateaxis    Examples   See Also

Convert serial-date axis labels to calendar-date axis labels.

Syntax

Arguments

aksis
Determines which axis tick labels--x, y, or z--to replace. Enter as a string. Default = 'x'.
dateform
Specifies which date format to use. Enter as an integer from 0 to 16. 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.

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.

dateform
Format
Description
0
01-Mar-1995 15:45:17
day-month-year hour:minute:second
1
01-mar-1995
day-month-year
2
03/01/95
month/day/year
3
Mar
month, three letters
4
M
month, single letter
5
3
month
6
03/01
month/day
7
1
day of month
8
Wed
day of week, three letters
9
W
day of week, single letter
10
1995
year, four digits
11
95
year, two digits
12
Mar95
month year
13
15:45:17
hour:minute:second
14
03:45:17 PM
hour:minute:second AM or PM
15
15:45
hour:minute
16
03:45 PM
hour:minute AM or PM

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, 1995.

See Also

bolling, candle, datenum, datestr, highlow, movavg, pointfig



[ Previous | Help Desk | Next ]