Convert serial-date axis labels to calendar-date axis labels
(Optional) Specifies which date format to use. Enter as an integer from
(Optional) Assigns the date to the first axis tick value,
specified as a serial date number, date character vector, or datetime
array. The tick values are treated as serial date numbers. The default
axis tick labels with date labels on a graphic figure.
See the MATLAB®
for information on modifying the axis tick values and other axis parameters.
month, three letters
month, single letter
day of month
day of week, three letters
day of week, single letter
year, four digits
year, two digits
hour:minute:second AM or PM
hour:minute AM or PM
year month day
dateaxis('x') or dateaxis
converts the x-axis labels to an automatically determined date format.
converts the y-axis labels to the month/day format.
dateaxis('x', 2, '03-Mar-1999')
dateaxis('x', 2, datetime('03-Mar-1999'))
converts the x-axis labels to the month/day/year format. The minimum x-tick value is treated as March 3, 1999.