is an option for DateListPlot which specifies how date tick labels should be formatted.
DateTicksFormat
is an option for DateListPlot which specifies how date tick labels should be formatted.
Details
- DateTicksFormat->Automatic chooses tick labels based on the range of dates to be plotted.
- DateTicksFormat->{"e1","sep12","e2",…} concatenates date elements "ei" with the specified separators. »
- Any of the date elements from DateString can be used.
- Typical elements include:
-
"Year" full year (e.g. 2005) "YearShort" 2-digit year (e.g. 05) "QuarterNameShort" quarter of year in short form (e.g. "Q1") "MonthNameShort" month name in short form (e.g. "Aug") "MonthNameInitial" first letter of month name (e.g. "A") "Month" 2-digit month number (e.g. 08) "MonthShort" 1- or 2-digit month number (e.g. 8) "DayNameShort" short day of the week (e.g. "Wed") "DayNameInitial" first letter of day name (e.g. "W") "Day" 2-digit day of the month (e.g. 09) "DayShort" 1- or 2-digit day of the month (e.g. 9 or 29) "Hour12" hour on 12-hour clock "Hour24" hour on 24-hour clock "AMPM" AM or PM "AMPMLowerCase" am or pm "Minute" 2-digit minute (e.g. 05) "Second" 2-digit seconds
Examples
open all close allBasic Examples (2)
Plot date-based data using default and specified ticks:
data = {{{2006, 10, 1}, 8}, {{2006, 10, 10}, 10}, {{2006, 10, 20}, 12}, {{2006, 10, 24}, 14}, {{2006, 11, 5}, 15}, {{2006, 11, 15}, 20}};{DateListPlot[data], DateListPlot[data, DateTicksFormat -> {"MonthShort", "/", "Day"}]}Specify both month and year information for ticks:
data = {{{2000, 7}, 8}, {{2001, 7}, 10}, {{2002, 7}, 12}, {{2003, 7}, 14}, {{2004, 7}, 15}, {{2005, 7}, 20}};{DateListPlot[data], DateListPlot[data, DateTicksFormat -> {"MonthNameShort", " ", "YearShort"}]}Scope (2)
Specify formats on any time scale:
DateListPlot[{13, 14, 17, 24, 26, 28, 29, 31, 42, 44}, {"1:00 PM", Automatic, "Hour"}, DateTicksFormat -> {"Hour12Short", "AMPM"}]Give date formats for ticks at specific positions:
DateListPlot[Range[10], {2000}, DateTicksFormat -> {"Month", "/", "Year"}, FrameTicks -> {{Automatic, Automatic}, {{{2002, 5}, {2006, 9}}, Automatic}}]See Also
Related Guides
History
Text
Wolfram Research (2007), DateTicksFormat, Wolfram Language function, https://reference.wolfram.com/language/ref/DateTicksFormat.html.
CMS
Wolfram Language. 2007. "DateTicksFormat." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/DateTicksFormat.html.
APA
Wolfram Language. (2007). DateTicksFormat. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DateTicksFormat.html
BibTeX
@misc{reference.wolfram_2026_dateticksformat, author="Wolfram Research", title="{DateTicksFormat}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/DateTicksFormat.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_dateticksformat, organization={Wolfram Research}, title={DateTicksFormat}, year={2007}, url={https://reference.wolfram.com/language/ref/DateTicksFormat.html}, note=[Accessed: 12-June-2026]}