Skip to content

datetick

plot · scripts/plot/appearance/datetick.m

: datetick ()
: datetick (tickaxis)
: datetick (tickaxis, dateform)
: datetick (…, "keeplimits")
: datetick (…, "keepticks")
: datetick (ax, …)

Label the tick marks of an axis with dates.

The data of the axis tickaxis ("x" by default, or "y", "z") are serial date numbers. Unless "keepticks" is given, evenly spaced tick positions are chosen for the visible date range and the axis limits are widened to the first and last tick ("keeplimits" leaves the limits alone and keeps all ticks inside them). The tick labels are then datestr of the tick values formatted with dateform, an integer from 0 to 31 or a format string; by default a format fitting the tick spacing is used.