({{, (RefLink[DateListPlot, paclet:ref/DateListPlot])[{{(Subscript[date, 1]),(Subscript[v, 1])},{(Subscript[date, 2]),(Subscript[v, 2])},…}] 
plots points with values (Subscript[v, i]) at a sequence of dates.}, {, (RefLink[DateListPlot, paclet:ref/DateListPlot])[{(Subscript[v, 1]),(Subscript[v, 2]),…},datespec]
plots points with dates at equal intervals specified by datespec.}, {, (RefLink[DateListPlot, paclet:ref/DateListPlot])[tseries]
plots the time series tseries.}, {, (RefLink[DateListPlot, paclet:ref/DateListPlot])[{(Subscript[data, 1]),(Subscript[data, 2]),…}]
plots data from all the (Subscript[data, i]).}, {, (RefLink[DateListPlot, paclet:ref/DateListPlot])[{…,w[(Subscript[data, i])],…]
plots (Subscript[data, i]) with features defined by the symbolic wrapper w.}})

OpenersNotesSection(Spacer1)Details and Options

Possible forms of (Subscript[date, i]) include:

In shortened date lists, omitted elements are taken to have default values {y,1,1,0,0,0}.

Possible forms of datespec include:

The Δt in datespec can be a {y,m,d,h,m,s} date list specification or any of the special forms "Year", "Quarter", "Month", "Week", "Day", "Hour", "Minute", "Second", and "Millisecond".

If no explicit Δt is given, the increments used will be the smallest time unit specified explicitly in start.

Data values (Subscript[v, i]) can be given in the following forms:

Values (Subscript[v, i]) that are not of the preceding form are taken to be missing and are not shown.

The (Subscript[data, i]) have the following forms and interpretations:

The following wrappers w can be used for the (Subscript[data, i]):

Wrappers w can be applied at multiple levels:

In (RefLink[DateListPlot, paclet:ref/DateListPlot]), (RefLink[Labeled, paclet:ref/Labeled]) and (RefLink[Placed, paclet:ref/Placed]) allow the following positions:

(RefLink[DateListPlot, paclet:ref/DateListPlot]) has the same options as (RefLink[Graphics, paclet:ref/Graphics]), with the following additions and changes:

(RefLink[DataRange, paclet:ref/DataRange]) determines how values {(Subscript[v, 1]),…,(Subscript[v, n])} are interpreted into {{(Subscript[date, 1]),(Subscript[y, 1])},…,{(Subscript[x, n]),(Subscript[y, n])}}. Possible settings include:

In general, a list of pairs {{(Subscript[x, 1]),(Subscript[y, 1])},{(Subscript[x, 2]),(Subscript[y, 2])},…} is interpreted as a list of points, but the setting (RefLink[DataRange, paclet:ref/DataRange])->(RefLink[All, paclet:ref/All]) forces it to be interpreted as multiple data {{(Subscript[y, 11]),(Subscript[y, 12])},{(Subscript[y, 21]),(Subscript[y, 23])},…}.

Typical settings for (RefLink[PlotLegends, paclet:ref/PlotLegends]) include:

(RefLink[ScalingFunctions, paclet:ref/ScalingFunctions])->"scale" scales the y coordinate; (RefLink[ScalingFunctions, paclet:ref/ScalingFunctions])->{"scalex","scaley"} scales both the x and y coordinates.

All explicit x coordinates in (RefLink[Prolog, paclet:ref/Prolog]), (RefLink[Epilog, paclet:ref/Epilog]), (RefLink[Ticks, paclet:ref/Ticks]), etc. are taken to be dates. »

OpenersPrimaryExamplesSection(Spacer1)Examples  (102)

OpenersExampleSection0(Spacer1)Basic Examples  (5)

Plot data with explicit date values:

data={{(DateObject["Day: ""Sat 1 Oct 2016", DateObject[{2016,10,1},"Day","Gregorian",-5.`]]),10},{(DateObject["Day: ""Sat 15 Oct 2016", DateObject[{2016,10,15},"Day","Gregorian",-5.`]]),17},{(DateObject["Day: ""Sun 30 Oct 2016", DateObject[{2016,10,30},"Day","Gregorian",-5.`]]),15},{(DateObject["Day: ""Sun 20 Nov 2016", DateObject[{2016,11,20},"Day","Gregorian",-5.`]]),20}};

DateListPlot[data]

Plot monthly values, starting in August 2000:

DateListPlot[{1,1,2,3,5,8,11},{2000,8}]

Plot multiple time series with a legend:

data1=TimeSeries[{1,1,2,3,5,8,11},{"Jan 1, 2015"}];
data2=TimeSeries[{5,8,9,6,2,4,7},{"Jan 1, 2015"}];

DateListPlot[{data1,data2},PlotLegends->{"first","second"}]

Add labels for the data:

DateListPlot[{{4,9,18,27,34,40,49,54,64,72},{1,9,11,16,18,25,34,43,49,54}},{2013,1,1},Joined->True,PlotLabels->{"first","second"}]

Retrieve and plot a historical stock price:

DateListPlot[FinancialData["IBM","Jan. 1, 2004"]]

OpenersExampleSection1(Spacer1)Scope  (43)

OpenersExampleSubsection0(Spacer1)Data  (9)

Plot a time series of temperatures:

data=WeatherData["KCMI", "MeanTemperature", {{2013, 1, 1}, {2013, 1, 31}, "Day"}]

DateListPlot[data,FrameLabel->Automatic,TargetUnits->"Fahrenheit"]

Dates given as (RefLink[AbsoluteTime, paclet:ref/AbsoluteTime]) specifications:

data={{3368649600,10},{3369859200,12},{3371155200,15},{3372969600,20}};

DateListPlot[data]

Dates given as (RefLink[DateString, paclet:ref/DateString]) specifications:

data={{"June 2006",10},{"August 2006",12},{"November 2006",15},{"January 2007",20}};

DateListPlot[data]

Dates given as elided (RefLink[DateList, paclet:ref/DateList]) specifications:

data={{{2006,6},10},{{2006,8},12},{{2006,11},15},{{2007,1},20}};

DateListPlot[data]

Plot a series of data using an initial starting date or time:

DateListPlot[Sin[Range[100]/(2Pi)],"August 15, 2006"]

DateListPlot[Sin[Range[100]/(2Pi)],{2006,8,15,12,15,0}]

Plot data spaced equally in time between a starting and ending date:

DateListPlot[Sqrt[Range[10]],{{2006,5,5},{2006,5,30}}]

Plot data gathered every 90 days, starting on January 1, 2006:

DateListPlot[Range[10],{{2006,1,1},Automatic,{0,0,90}}]

Plot data gathered on the 15(^th) day of each month, starting in January:

DateListPlot[Range[10],{{2006,1,15},Automatic,"Month"}]

Dates determined by an ending date and a step:

DateListPlot[ArcTan[Range[50]/5],{Automatic,"September 2010","Month"}]

Use (RefLink[ScalingFunctions, paclet:ref/ScalingFunctions]) to scale the axes:

DateListPlot[FinancialData["IBM","Jan. 1, 2010"],ScalingFunctions->"Log"]

OpenersExampleSubsection1(Spacer1)Special Data  (5)

Use (RefLink[Quantity, paclet:ref/Quantity]) to include units with the data:

DateListPlot[Quantity[Sqrt[Range[10]],"Meters"],{2010,1,1},FrameLabel->Automatic]

Plot data in a (RefLink[QuantityArray, paclet:ref/QuantityArray]):

qa=QuantityArray[RandomReal[{0,40},20],"Fahrenheit"]

DateListPlot[qa,{2000,1,1},FrameLabel->Automatic]

Specify the units used with (RefLink[TargetUnits, paclet:ref/TargetUnits]):

DateListPlot[qa,{2000,1,1},TargetUnits->"Kelvin",FrameLabel->Automatic]

Plot (RefLink[TimeSeries, paclet:ref/TimeSeries]) directly:

data=CountryData["UnitedStates",{{"Population"},{1988,2013}}]

DateListPlot[data,FrameLabel->Automatic]

Numeric values in an (RefLink[Association, paclet:ref/Association]) are used as the y coordinates:

DateListPlot[<|"a"->2,"b"->3,"c"->5,"d"->7,"e"->11,"f"->13|>,"Jan, 1, 2010"]

Numeric keys and values in an (RefLink[Association, paclet:ref/Association]) are used as the x and y coordinates:

DateListPlot[<|2->1,3->2,5->3,7->4,11->5,13->6|>]

Plot data with uncertainty:

DateListPlot[Table[Around[n,RandomReal[1,2]],{n,10}],{2010,1,1}]

Use intervals:

DateListPlot[Table[Interval[RandomReal[{n-1,n+1},2]],{n,10}],{2010,1,1}]

DateListPlot[Table[Interval[RandomReal[{n-1,n+1},2]],{n,10}],{2010,1,1},IntervalMarkers->"Bands"]

OpenersExampleSubsection2(Spacer1)Wrappers  (8)

Use wrappers on individual data, datasets, or collections of datasets:

{DateListPlot[{Style[{1,1,2,3,5,8},Green],{2,3,5,7,11}},{2014,8}],DateListPlot[Style[{{1,1,2,3,5,8},{2,3,5,7,11}},Blue],{2014,8}]}

Wrappers can be nested:

DateListPlot[Style[{Style[{1,1,2,3,5,8},Green],{2,3,5,7,11}},Blue],{2014,8}]

Use the value of each point as a tooltip:

DateListPlot[Tooltip[Prime[Range[10]]],{2014,8},Mesh->Full]

Use a specific label for all the points:

DateListPlot[Tooltip[Prime[Range[10]],"primes"],{2014,8},Mesh->Full]

Use (RefLink[PopupWindow, paclet:ref/PopupWindow]) to provide additional drilldown information:

DateListPlot[{1,PopupWindow[2,DateListPlot[FinancialData["IBM","Jan. 1, 2004"]]],3},{2004,1},Mesh->Full,PlotStyle->PointSize[0.05]]

(RefLink[Button, paclet:ref/Button]) can be used to trigger any action:

DateListPlot[{1,Button[2,Speak[2]],3},{2014,8},Mesh->Full,PlotStyle->PointSize[0.05]]

Use (RefLink[Annotation, paclet:ref/Annotation]) for dynamic action when the mouse enters the plot:

data=TimeSeries[];

{DateListPlot[Annotation[data,"label","Mouse"]],Dynamic[MouseAnnotation[]]}

Use (RefLink[Hyperlink, paclet:ref/Hyperlink]) to jump to the specified link when clicked:

data=TimeSeries[];

DateListPlot[Hyperlink[data, "http://www.wolfram.com"]]

Use (RefLink[StatusArea, paclet:ref/StatusArea]) to display a string in the status area of the current notebook:

data=TimeSeries[];

DateListPlot[StatusArea[data, "String"]]

OpenersExampleSubsection3(Spacer1)Labeling and Legending  (13)

Label data with (RefLink[Labeled, paclet:ref/Labeled]):

data1=Accumulate@RandomInteger[10,10];data2=Accumulate@RandomInteger[3,10];

DateListPlot[{Labeled[data1,"company1"],Labeled[data2,"company2"]},{2010,1,1}]

Label points with automatically positioned text:

DateListPlot[Table[Labeled[RandomReal[],i],{i,15}],{2010,1,1},PlotMarkers->Automatic]

Place the labels relative to the points:

Table[DateListPlot[Table[Labeled[RandomReal[],i,p],{i,6}],{2010,1,1},PlotMarkers->Automatic,PlotLabel->p],{p,{Above,Below,Before,After}}]

Label data with (RefLink[PlotLabels, paclet:ref/PlotLabels]):

data1=Accumulate@RandomInteger[10,10];data2=Accumulate@RandomInteger[3,10];

DateListPlot[{data1,data2},{2000},PlotLabels->{"company1","company2"}]

Place the label near the points at a date:

DateListPlot[Labeled[Accumulate@RandomInteger[10,10],"label",{2004}],{2000}]

Use a scaled position:

DateListPlot[Labeled[Accumulate@RandomInteger[10,10],"label",Scaled[0.3]],{2000}]

Specify the text position relative to the point:

DateListPlot[Labeled[Accumulate@RandomInteger[10,10],"label",{Scaled[0.3],Below}],{2000}]

Include legends for each curve:

data1=Accumulate@RandomInteger[10,20];data2=Accumulate@RandomInteger[3,20];

DateListPlot[{data1,data2},{2000},PlotLegends->{"company1","company2"}]

Use callouts to label curves:

data1=Accumulate@RandomInteger[10,20];data2=Accumulate@RandomInteger[3,20];

DateListPlot[{Callout[data1,"company1"],Callout[data2,"company2"]},{2000,8}]

Place a callout at a named location:

DateListPlot[{{1,1,2,3,5,8,11}, Callout[{4,7,8,5,3,4,1},"max",Above]},{2000,8}]

Place a callout at a specific location:

DateListPlot[Callout[{1,1,2,3,5,8,11},"label",(DateObject["Day: ""Sun 1 Oct 2000", DateObject[{2000,10,1},"Day","Gregorian",-6.`]])],{2000,8}]

Specify the maximum size of labels:

data=Rule[TimeSeries[{1,1,2,3,5,8,11},{"Jan 1, 2015"}],RandomWord[7]];

DateListPlot[data,LabelingSize->30]

Use the full label:

DateListPlot[data,LabelingSize->Full]

For dense sets of points, some labels may be turned into tooltips by default:

data=Rule[TimeSeries[RandomReal[1,100],{"Jan 1, 2015"}],RandomWord[100]];

DateListPlot[data,PlotMarkers->Automatic,Joined->False]

Increasing the size of the plot will show more labels:

DateListPlot[data,ImageSize->400,Joined->False,PlotMarkers->Automatic]

Use (RefLink[Legended, paclet:ref/Legended]) to provide a legend for a specific dataset:

data1=Accumulate@RandomInteger[10,20];data2=Accumulate@RandomInteger[3,20];

DateListPlot[{data1,data2,Legended[data1-data2,"difference"]},{200}]

Use (RefLink[Placed, paclet:ref/Placed]) to change the legend location:

DateListPlot[{data1,data2,Legended[data1-data2,Placed["difference",Bottom]]},{200}]

Use (RefLink[Association, paclet:ref/Association]) keys as labels:

data1=Accumulate@RandomInteger[10,20];data2=Accumulate@RandomInteger[3,20];

DateListPlot[<|"company A"->data1,"company B"->data2|>,{2000},PlotLabels->Automatic,PlotLegends->None]

OpenersExampleSubsection4(Spacer1)Presentation  (8)

Multiple curves are automatically colored to be distinct:

data={TimeSeries[],TimeSeries[]};

DateListPlot[data]

Provide explicit styling to different curves:

data={TimeSeries[],TimeSeries[]};

DateListPlot[data,PlotStyle->{Dashed,Red}]

Include legends for each dataset:

DateListPlot[{FinancialData["AAPL","FractionalChange",{{2010,1},{2010,2}}],FinancialData["IBM","FractionalChange",{{2010,1},{2010,2}}]},PlotLegends->{"AAPL","IBM"}]

Use (RefLink[Legended, paclet:ref/Legended]) to provide a legend for a specific dataset:

data=Accumulate[RandomInteger[{-10,10},100]];
avg=MovingAverage[data,10];

DateListPlot[{data,Legended[avg,"moving average"]},{{2013,1,1},Automatic,"Day"},Joined->True]

Use a theme with detailed ticks and grid lines:

data={FinancialData["BAC","FractionalChange",{{2014,1},{2014,4}}],FinancialData["WFC","FractionalChange",{{2014,1},{2014,4}}]};

DateListPlot[data,PlotTheme->"Detailed"]

Use a more stylized theme:

DateListPlot[data,PlotTheme->"Marketing"]

Create filled plots:

data={TimeSeries[],TimeSeries[]};

DateListPlot[data,Filling->Axis]

Fill between the curves:

DateListPlot[data,Filling->{1->{2}}]

Use shapes to distinguish different datasets:

data={TimeSeries[],TimeSeries[]};

DateListPlot[data,Mesh->Full,PlotMarkers->Automatic]

Plot the data in a stacked layout:

data1={{(DateObject["Day: ""Sat 1 Oct 2016", DateObject[{2016,10,1},"Day","Gregorian",-5.`]]),10},{(DateObject["Day: ""Sat 15 Oct 2016", DateObject[{2016,10,15},"Day","Gregorian",-5.`]]),17},{(DateObject["Day: ""Sun 30 Oct 2016", DateObject[{2016,10,30},"Day","Gregorian",-5.`]]),15},{(DateObject["Day: ""Sun 20 Nov 2016", DateObject[{2016,11,20},"Day","Gregorian",-5.`]]),20}};

data2={{(DateObject["Day: ""Sat 1 Oct 2016", DateObject[{2016,10,1},"Day","Gregorian",-5.`]]),15},{(DateObject["Day: ""Sat 15 Oct 2016", DateObject[{2016,10,15},"Day","Gregorian",-5.`]]),7},{(DateObject["Day: ""Sun 30 Oct 2016", DateObject[{2016,10,30},"Day","Gregorian",-5.`]]),12},{(DateObject["Day: ""Sun 20 Nov 2016", DateObject[{2016,11,20},"Day","Gregorian",-5.`]]),10}};

DateListPlot[{data1, data2},PlotLayout->"Stacked"]

Plot the data as percentiles of the total of the values:

DateListPlot[{data1, data2},PlotLayout->"Percentile"]

OpenersExampleSection2(Spacer1)Options  (50)

OpenersExampleSubsection5(Spacer1)AxesOrigin  (1)

Axes origin specified with a date string x coordinate:

DateListPlot[Range[10],{2007},AxesOrigin->{"July 1, 2011",0},Axes->True,Frame->False]

OpenersExampleSubsection6(Spacer1)DateFunction  (2)

Prepend a year to create dates from {month,day} lists:

data={{{10,1},8},{{10,10},10},{{10,20},12},{{10,24},14},{{11,5},15}, {{11,15},20}};

DateListPlot[data,DateFunction:>(Join[{2006},#]&)]

Define functions for interpreting ambiguous date strings:

data={{"06/01/06",8},{"07/01/06",10},{"08/01/06",12},{"09/01/06",14},{"10/01/06",15}, {"11/01/06",20}};

DateListPlot[data,DateFunction:>(DateList[{#,{"Month","Day","YearShort"}}]&)]

DateListPlot[data,DateFunction:>(DateList[{#,{"Day","Month","YearShort"}}]&)]

DateListPlot[data,DateFunction:>(DateList[{#,{"YearShort","Month","Day"}}]&)]

OpenersExampleSubsection7(Spacer1)DateTicksFormat  (1)

Specify the format of date ticks as (RefLink[DateString, paclet:ref/DateString]) elements:

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,DateTicksFormat->{"MonthShort","/","Day"}]

OpenersExampleSubsection8(Spacer1)Epilog  (1)

Place text using a shortened (RefLink[DateList, paclet:ref/DateList]) as the x coordinate:

DateListPlot[Range[10],{2007},Epilog:>Text["linear trend",{{2010,1,15},6}]]

OpenersExampleSubsection9(Spacer1)Filling  (1)

Fill from data points to the bottom:

DateListPlot[Sqrt[Range[10]],{2007,4,10},Filling->Bottom,FillingStyle->Pink]

Fill to the bottom with points joined:

DateListPlot[Sqrt[Range[10]],{2007,4,10},Filling->Bottom,Joined->True]

OpenersExampleSubsection10(Spacer1)FrameTicks  (2)

Give explicit dates for horizontal ticks:

DateListPlot[Sqrt[Range[10]],{2007,4,10},FrameTicks->{{Automatic,Automatic},{{{2007,4,12},{2007,4,18}},Automatic}}]

Use different date specifications:

DateListPlot[Sqrt[Range[10]],{2007,4,10},FrameTicks->{{Automatic,Automatic},{{"April 12, 2007","April 18, 2007"},Automatic}}]

DateListPlot[Sqrt[Range[10]],{2007,4,10},FrameTicks->{{Automatic,Automatic},{{3385324800,3385843200},Automatic}}]

Include a specific tick label, length, and style:

DateListPlot[Sqrt[Range[10]],{2007,4,10},FrameTicks->{{Automatic,Automatic},{{{{2007,4,15},"tax day",.05,Red}},None}}]

OpenersExampleSubsection11(Spacer1)GridLines  (1)

Include grid lines at specific dates:

DateListPlot[Sqrt[Range[15]],{2007,4,10},GridLines->{{{2007,4,15},"Apr 22, 2007"},None}]

Make the first grid line (RefLink[Blue, paclet:ref/Blue]):

DateListPlot[Sqrt[Range[15]],{2007,4,10},GridLines->{{{{2007,4,15},Blue},"Apr 22, 2007"},None}]

OpenersExampleSubsection12(Spacer1)IntervalMarkers  (3)

By default, uncertainties are capped:

DateListPlot[Table[Around[RandomReal[],0.1],10],Today]

Use bars to denote uncertainties without caps:

DateListPlot[Table[Around[RandomReal[],0.1],10],Today,IntervalMarkers->"Bars"]

Use bands to represent uncertainties:

DateListPlot[Table[Around[RandomReal[],.1],10],Today,IntervalMarkers->"Bands"]

OpenersExampleSubsection13(Spacer1)IntervalMarkersStyle  (2)

Uncertainties automatically inherit the plot style:

DateListPlot[{Table[Around[RandomReal[20],1],10],Table[Around[RandomReal[20],1],10]},Today,PlotStyle->{Red,Blue}]

Specify the style for uncertainties:

DateListPlot[{Table[Around[RandomReal[20],1],10],Table[Around[RandomReal[20],1],10]},Today,IntervalMarkersStyle->Gray]

OpenersExampleSubsection14(Spacer1)Joined  (2)

Plot data with points joined by a line:

DateListPlot[Sin[Range[100]/Pi],{2006,1,1},Joined->True]

Plot multiple datasets with points joined:

data1={{{2006,10,1,0,0,0},10},{{2006,10,15,0,0,0},12},{{2006,10,30,0,0,0},15}, {{2006,11,20,0,0,0},20}};

data2={{{2006,10,5,0,0,0},15},{{2006,10,20,0,0,0},8},{{2006,11,10,0,0,0},5}, {{2006,11,15,0,0,0},1}};

DateListPlot[{data1,data2},Joined->True]

Only join points for the first dataset:

DateListPlot[{data1,data2},Joined->{True,False}]

OpenersExampleSubsection15(Spacer1)LabelingFunction  (3)

By default, points are automatically labeled with strings:

DateListPlot[{1,1,2,3,5,8}->{"a","b","c","d","e","f"},{2000}]

Use (RefLink[LabelingFunction, paclet:ref/LabelingFunction])->(RefLink[None, paclet:ref/None]) to suppress the labels:

DateListPlot[{1,1,2,3,5,8}->{"a","b","c","d","e","f"},{2000},LabelingFunction->None]

Put the labels above the points:

DateListPlot[{1,1,2,3,5,8}->{"a","b","c","d","e","f"},{2000},LabelingFunction->(Placed[Last@#1,Above] &)]

Put them in a tooltip:

DateListPlot[{1,1,2,3,5,8}->{"a","b","c","d","e","f"},{2000},LabelingFunction->(Placed[Last@#1,Tooltip] &),PlotMarkers->Automatic]

OpenersExampleSubsection16(Spacer1)LabelingSize  (4)

Textual labels are shown at their actual sizes:

DateListPlot[TimeSeries[{1,1,2,3,5,8},{"Jan 1, 2015"}]->{"healthfulness","obstreperous","spectrogram","vestige","coinage","limey"},ImageSize->Medium]

Image labels are automatically resized:

DateListPlot[TimeSeries[{1,1,2,3,5,8},{"Jan 1, 2015"}]->{,,,,,},ImageSize->Medium]

Specify a maximum size for textual labels:

DateListPlot[TimeSeries[{1,1,2,3,5,8},{"Jan 1, 2015"}]->{"healthfulness","obstreperous","spectrogram","vestige","coinage","limey"},ImageSize->Medium,LabelingSize->30]

Specify a maximum size for image labels:

DateListPlot[TimeSeries[{1,1,2,3,5,8},{"Jan 1, 2015"}]->{,,,,,},ImageSize->Medium,LabelingSize->20]

Show image labels at their natural sizes:

DateListPlot[TimeSeries[{1,1,2,3,5,8},{"Jan 1, 2015"}]->{,,,,,},ImageSize->Medium,LabelingSize->Full]

OpenersExampleSubsection17(Spacer1)PlotLabel  (1)

Add an overall label to the plot:

DateListPlot[RandomInteger[10,10],{2007},PlotLabel->"plot label"]

OpenersExampleSubsection18(Spacer1)PlotLabels  (4)

Specify text to label curves:

data1=Transpose[{DateRange[{2000,1,1},{2000,1,15}],RandomReal[10,15]}];

data2=Transpose[{DateRange[{2000,1,1},{2000,1,15}],RandomReal[10,15]}];

DateListPlot[{data1,data2},PlotLabels->{"label1","label2"}]

Place the label above the data:

ge=FinancialData["GE","Jan. 1, 2000"];

DateListPlot[ge,PlotLabels->Placed["high",Above]]

Place the label below the data at a specific date:

DateListPlot[ge,PlotLabels->Placed["label",{(DateObject["Thu 1 Jan 2009", DateObject[{2009,1,1}]]),Below}]]

Use a callout to label the curve:

DateListPlot[ge,PlotLabels->Callout["label",{(DateObject["Thu 1 Jan 2009", DateObject[{2009,1,1}]]),Above}]]

(RefLink[PlotLabel, paclet:ref/PlotLabel])->Automatic uses keys of an (RefLink[Association, paclet:ref/Association]) as data labels:

DateListPlot[<|"a"->Accumulate@RandomInteger[10,10],"b"->Accumulate@RandomInteger[10,10]|>,{2007},PlotLabels->Automatic,PlotLegends->None]

Use (RefLink[None, paclet:ref/None]) to not add a label:

data1=Transpose[{DateRange[{2000,1,1},{2000,1,15}],Accumulate@RandomReal[10,15]}];
data2=Transpose[{DateRange[{2000,1,1},{2000,1,15}],Accumulate@RandomReal[3,15]}];

DateListPlot[{data1,data2},PlotLabels->{"label1",None}]

OpenersExampleSubsection19(Spacer1)PlotLayout  (1)

By default. curves are overlaid on each other:

data1={{(DateObject["Day: ""Sat 1 Oct 2016", DateObject[{2016,10,1},"Day","Gregorian",-5.`]]),10},{(DateObject["Day: ""Sat 15 Oct 2016", DateObject[{2016,10,15},"Day","Gregorian",-5.`]]),17},{(DateObject["Day: ""Sun 30 Oct 2016", DateObject[{2016,10,30},"Day","Gregorian",-5.`]]),15},{(DateObject["Day: ""Sun 20 Nov 2016", DateObject[{2016,11,20},"Day","Gregorian",-5.`]]),20}};

data2={{(DateObject["Day: ""Sat 1 Oct 2016", DateObject[{2016,10,1},"Day","Gregorian",-5.`]]),15},{(DateObject["Day: ""Sat 15 Oct 2016", DateObject[{2016,10,15},"Day","Gregorian",-5.`]]),7},{(DateObject["Day: ""Sun 30 Oct 2016", DateObject[{2016,10,30},"Day","Gregorian",-5.`]]),12},{(DateObject["Day: ""Sun 20 Nov 2016", DateObject[{2016,11,20},"Day","Gregorian",-5.`]]),10}};

DateListPlot[{data1, data2}]

Plot the data in a stacked layout:

DateListPlot[{data1, data2},PlotLayout->"Stacked"]

Plot the data as percentiles of the total of the values:

DateListPlot[{data1, data2},PlotLayout->"Percentile"]

Place each curve in a separate panel using shared axes:

DateListPlot[{data1, data2},PlotLayout->"Column"]

Use rows instead of columns:

DateListPlot[{data1, data2},PlotLayout->"Row",ImageSize->Medium]

OpenersExampleSubsection20(Spacer1)PlotLegends  (6)

(RefLink[PlotLegends, paclet:ref/PlotLegends]) matches up styles in the plot:

DateListPlot[{Range[10],Range[10]+3},{2007},PlotStyle->{Directive[AbsolutePointSize[4],Blue],Directive[AbsolutePointSize[8],Red]},PlotLegends->Automatic]

(RefLink[PlotLegends, paclet:ref/PlotLegends]) matches up markers in the plot:

DateListPlot[{Range[10],Range[10]^2},{2007},PlotMarkers->Automatic,PlotLegends->Automatic]

Use a list of legend labels:

DateListPlot[{Range[10],Range[10]+3, Sqrt@Range[10],Log@Range[10]},{2007},PlotLegends->{"a","b","c","d"}]

Use (RefLink[MetaInformation, paclet:ref/MetaInformation]) from a (RefLink[TimeSeries, paclet:ref/TimeSeries]):

data=TimeSeries[];

See the available (RefLink[MetaInformation, paclet:ref/MetaInformation]):

data["MetaInformation"]

The metal list can be extracted directly:

data["MetalList"]

Visualize the data:

DateListPlot[data,PlotLegends->data["MetalList"]]

Use (RefLink[Placed, paclet:ref/Placed]) to specify legend placement:

Table[DateListPlot[{Range[10],Range[10]+3},{2007},PlotLegends->Placed[Automatic,pos],PlotLabel->pos],{pos,{Above,Below}}]

Table[DateListPlot[{Range[10],Range[10]+3},{2007},PlotLegends->Placed[Automatic,pos],PlotLabel->pos],{pos,{Before,After}}]

Use (RefLink[PointLegend, paclet:ref/PointLegend]) to change legend appearance:

DateListPlot[{Range[10],Range[10]+3},{2007},PlotLegends->PointLegend[Automatic,{"list1","list2"},LegendFunction->Panel,LegendMargins->5]]

OpenersExampleSubsection21(Spacer1)PlotRange  (1)

Restrict the range of dates over which to plot:

DateListPlot[10/Range[100],{2007,4,1},PlotRange->{{{2007,4,15},{2007,6,15}},Automatic}]

OpenersExampleSubsection22(Spacer1)PlotTheme  (2)

Use a theme with a dark background in a high-contrast color scheme:

DateListPlot[{Sqrt[Range[20]],Log[Range[20]]},{2007,1,1},PlotTheme->"Marketing"]

Change the color scheme:

DateListPlot[{Sqrt[Range[20]],Log[Range[20]]},{2007,1,1},PlotTheme->"Marketing",PlotStyle->96]

OpenersExampleSubsection23(Spacer1)Prolog  (1)

Place text using a shortened (RefLink[DateList, paclet:ref/DateList]) as the x coordinate:

DateListPlot[Range[10],{2007},Prolog:>Text["linear trend",{{2010,1,15},6}]]

OpenersExampleSubsection24(Spacer1)ScalingFunctions  (7)

By default, plots have linear scales in each direction:

DateListPlot[TimeSeries[{1,1,4,9,25,64,121},{"Jan 1, 2015"}]]

Use a log scale in the y direction:

DateListPlot[TimeSeries[{1,1,4,9,25,64,121},{"Jan 1, 2015"}],ScalingFunctions->"Log"]

Use a linear scale in the y direction that shows smaller numbers at the top:

DateListPlot[TimeSeries[{1,1,4,9,25,64,121},{"Jan 1, 2015"}],ScalingFunctions->"Reverse"]

Use a reciprocal scale in the y direction:

DateListPlot[TimeSeries[{1,1,2,3,5,8,11},{"Jan 1, 2015"}],ScalingFunctions->"Reciprocal"]

Use a scale defined by a function and its inverse:

DateListPlot[TimeSeries[{1,1,4,9,25,64,121},{"Jan 1, 2015"}],ScalingFunctions->{-Log[#]&,Exp[-#]&}]

Positions in (RefLink[FrameTicks, paclet:ref/FrameTicks]) and (RefLink[GridLines, paclet:ref/GridLines]) are automatically scaled:

DateListPlot[TimeSeries[{1,1,4,9,25,64,121},{"Jan 1, 2015"}],ScalingFunctions->"Log",FrameTicks->{Automatic,2^Range[0,10]},GridLines->{None,2^Range[0,10]}]

(RefLink[PlotRange, paclet:ref/PlotRange]) is automatically scaled:

DateListPlot[TimeSeries[{1,1,4,9,25,64,121},{"Jan 1, 2015"}],ScalingFunctions->"Log",PlotRange->{0.5,500}]

OpenersExampleSubsection25(Spacer1)TargetUnits  (1)

Units are automatically extracted from the data:

DateListPlot[Quantity[Sqrt[Range[10]],"Kilograms"],{2010,1,1},FrameLabel->Automatic]

Specify the units to use:

DateListPlot[Quantity[Sqrt[Range[10]],"Kilograms"],{2010,1,1},FrameLabel->Automatic,TargetUnits->"Pounds"]

OpenersExampleSubsection26(Spacer1)Ticks  (3)

Give explicit dates for horizontal ticks:

DateListPlot[Sqrt[Range[10]],{2007,4,10},Ticks->{{{2007,4,12},{2007,4,18}},Automatic},Axes->True,Frame->False]

Give explicit dates as date strings or absolute times:

DateListPlot[Sqrt[Range[10]],{2007,4,10},Ticks->{{"April 12, 2007","April 18, 2007"},Automatic},Axes->True,Frame->False]

DateListPlot[Sqrt[Range[10]],{2007,4,10},Ticks->{{3385324800,3385843200},Automatic},Axes->True,Frame->False]

Include a specific tick label, length, and style:

DateListPlot[Sqrt[Range[10]],{2007,4,10},Ticks->{{{{2007,4,15},"tax day",.05,Red}},Automatic},Axes->True,Frame->False]

OpenersExampleSection3(Spacer1)Applications  (2)

Get stock price data:

data=FinancialData["GE",{2000,1,1}];

DateListPlot[data,Joined->True,Filling->Bottom]

Plot data gathered at regular intervals and stored without explicit dates:

data={56.1,60.7,51.6,52.,57.5,56.7,67.4,69.9,72.9,69.7,70.3,72.1};

DateListPlot[data,{{2006,6,1,8},Automatic,"Hour"}]

Modify the ticks:

DateListPlot[data,{{2006,6,1,8},Automatic,"Hour"},DateTicksFormat->{"Hour12Short","AMPMLowerCase"}]

OpenersExampleSection4(Spacer1)Properties & Relations  (2)

Date coordinates are plotted as absolute times:

data=Transpose[{Table[{1900,1,1,i},{i,24}],Range[24]}];

DateListPlot[data,GridLines->{{5 10^4},None}]

A (RefLink[ListPlot, paclet:ref/ListPlot]) using the (RefLink[AbsoluteTime, paclet:ref/AbsoluteTime]) values:

lpdata=data;
lpdata[[All,1]]=Map[AbsoluteTime,data[[All,1]]];

ListPlot[lpdata,GridLines->{{5 10^4},None},Frame->True]

(RefLink[DateListLogPlot, paclet:ref/DateListLogPlot]) plots date-based data on a logarithmic scale:

DateListLogPlot[Exp[Range[15]],{2008,1,1}]

DateListPlot[Exp[Range[15]],{2008,1,1}]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[DateListLogPlot, paclet:ref/DateListLogPlot])  ▪  (RefLink[StackedDateListPlot, paclet:ref/StackedDateListPlot])  ▪  (RefLink[DateListStepPlot, paclet:ref/DateListStepPlot])  ▪  (RefLink[ListPlot, paclet:ref/ListPlot])  ▪  (RefLink[TimelinePlot, paclet:ref/TimelinePlot])  ▪  (RefLink[DateHistogram, paclet:ref/DateHistogram])  ▪  (RefLink[DateString, paclet:ref/DateString])  ▪  (RefLink[DateList, paclet:ref/DateList])  ▪  (RefLink[CandlestickChart, paclet:ref/CandlestickChart])  ▪  (RefLink[TradingChart, paclet:ref/TradingChart])  ▪  (RefLink[Databin, paclet:ref/Databin])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Financial & Economic Data, paclet:guide/FinancialAndEconomicData])}, {▪(RefLinkPlain[Data Visualization, paclet:guide/DataVisualization])}, {▪(RefLinkPlain[Time Series Processing, paclet:guide/TimeSeries])}, {▪(RefLinkPlain[Date & Time, paclet:guide/DateAndTime])}, {▪(RefLinkPlain[Using the Wolfram Data Drop, paclet:guide/UsingTheWolframDataDrop])}, {▪(RefLinkPlain[Date & Time Visualization, paclet:guide/DateAndTimeVisualization])}, {▪(RefLinkPlain[Financial Visualization, paclet:guide/FinancialVisualization])}, {▪(RefLinkPlain[Weather Data, paclet:guide/WeatherData])}, {▪(RefLinkPlain[Scientific Data Analysis, paclet:guide/ScientificDataAnalysis])}, {▪(RefLinkPlain[Statistical Visualization, paclet:guide/StatisticalVisualization])}, {▪(RefLinkPlain[Charting and Information Visualization, paclet:guide/ChartingAndInformationVisualization])}, {▪(RefLinkPlain[Socioeconomic & Demographic Data, paclet:guide/SocioeconomicAndDemographicData])}, {▪(RefLinkPlain[Financial Computation, paclet:guide/Finance])}, {▪(RefLinkPlain[Numbers with Uncertainty, paclet:guide/NumbersWithUncertainty])}})}})

({{(Spacer1), ({{(Spacer1)Related Links}, {(WebLink[DocumentationFooterIconsRelatedLinks-EIWL.png(Spacer1)An Elementary Introduction to the Wolfram Language, https://www.wolfram.com/language/elementary-introduction/19-dates-and-times.html])(WebLink[: Dates and Times, https://www.wolfram.com/language/elementary-introduction/19-dates-and-times.html])}, {(WebLink[DocumentationFooterIconsRelatedLinks-EIWL.png(Spacer1)An Elementary Introduction to the Wolfram Language, https://www.wolfram.com/language/elementary-introduction/43-storing-things.html])(WebLink[: Storing Things, https://www.wolfram.com/language/elementary-introduction/43-storing-things.html])}})}})