DateListPlot[{{date1, v1}, {date2, v2}, ...}]
plots points with values at a sequence of dates.

DateListPlot[{v1, v2, ...}, datespec]
plots points with dates at equal intervals specified by datespec.

DateListPlot[{list1, list2, ...}]
plots several lists of values.

Details and OptionsDetails and Options

  • DateListPlot[list] by default plots each value in list as a separate point.
  • DateListPlot[list, Joined->True] draws a line through the list of points. »
  • Possible forms of include: »
  • tabsolute time given as a single number
    {y,m,d,h,m,s}DateList specification
    {y}, , , ...shortened date list
    "string"DateString specification
  • In shortened date lists, omitted elements are taken to have default values .
  • Possible forms of datespec include: »
  • {start,end}dates from start to end in equal steps
    {start,Automatic,step}dates beginning with start in steps step
    {Automatic,end,step}dates ending with end in steps step
    startdates with steps determined by the form of start
  • The step in datespec can be a date list specification or any of the special forms , , , , , , , , . »
  • If no explicit step is given, the step used will be the smallest time unit specified explicitly in start.
  • DateListPlot has the same options as ListPlot, with the following additions and changes:
  • AxesAutomaticwhether to include axes
    DateFunctionAutomatichow to convert dates to standard form
    DateTicksFormatAutomaticformat for date tick labels
    FrameTruewhether to put a frame around the plot
    GridLines{Automatic,None}whether to include grid lines
    PlotRangeAutomaticrange of values to include
  • All explicit coordinates in Prolog, Epilog, Ticks, etc. are taken to be dates. »

ExamplesExamplesopen allclose all

Basic Examples (5)Basic Examples (5)

Plot data with explicit date values:

Click for copyable input
Click for copyable input

Plot monthly values starting in August 2000:

Click for copyable input

Join the points:

Click for copyable input

Plot multiple datasets:

Click for copyable input
Click for copyable input
Click for copyable input

Retrieve and plot a historical stock price:

Click for copyable input
New in 6
New to Mathematica? Find your learning path »
Have a question? Ask support »