represents the canonical mapping of continuous dates and times to a quantitative scale.
DateScale
represents the canonical mapping of continuous dates and times to a quantitative scale.
Details and Options
- DateScale is typically used as a setting for ScalingFunctions to create plots and charts with date- or time-scaled axes.
- DateScale takes the following options:
-
DateFunction how to interpret values as dates DateTicksFormat how to format dates used as tick labels - The function f in DateFunctionf should return DateObject[…] when applied to the coordinate values.
Examples
Basic Examples (2)
Dates are automatically formatted in the axes:
ListLinePlot[IconizedObject[«date values»], ScalingFunctions -> {DateScale[], None}]Specify how the dates should be formatted:
ListLinePlot[IconizedObject[«date values»], ScalingFunctions -> {DateScale[DateTicksFormat -> {"MonthShort", "/", "Day"}], None}]Specify that the dates should be taken to be month, then day:
data = {{"01-01", 1}, {"01-02", 2}, {"01-03", 3}, {"01-04", 4}, {"01-05", 5}, {"01-06", 6}, {"01-07", 5}, {"01-08", 6}};ListLinePlot[data, ScalingFunctions -> {DateScale[DateFunction -> (DateObject[{#, {"Month", "-", "Day"}}]&)], None}]Reverse the order and use day, then month, for the dates:
ListLinePlot[data, ScalingFunctions -> {DateScale[DateFunction -> (DateObject[{#, {"Day", "-", "Month"}}]&)], None}]Related Guides
History
Text
Wolfram Research (2021), DateScale, Wolfram Language function, https://reference.wolfram.com/language/ref/DateScale.html.
CMS
Wolfram Language. 2021. "DateScale." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/DateScale.html.
APA
Wolfram Language. (2021). DateScale. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DateScale.html
BibTeX
@misc{reference.wolfram_2026_datescale, author="Wolfram Research", title="{DateScale}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/DateScale.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_datescale, organization={Wolfram Research}, title={DateScale}, year={2021}, url={https://reference.wolfram.com/language/ref/DateScale.html}, note=[Accessed: 13-June-2026]}