This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

DateListPlot

DateListPlot
plots points with values at a sequence of dates.
DateListPlot
plots points with dates at equal intervals specified by datespec.
DateListPlot
plots several lists of values.
  • DateListPlot[list] by default plots each value in list as a separate point.
  • 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.
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
Plot data with explicit date values:
Plot monthly values starting in August 2000:
Join the points:
Plot multiple datasets:
Retrieve and plot a historical stock price:
Plot data with explicit date values:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
 
Plot monthly values starting in August 2000:
In[1]:=
Click for copyable input
Out[1]=
 
Join the points:
In[1]:=
Click for copyable input
Out[1]=
 
Plot multiple datasets:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
Out[3]=
 
Retrieve and plot a historical stock price:
In[1]:=
Click for copyable input
Out[1]=
Dates given as AbsoluteTime specifications:
Dates given as DateString specifications:
Dates given as elided DateList specifications:
Plot a series of data using an initial starting date or time:
Plot data spaced equally in time between a starting and ending date:
Plot data gathered every 90 days starting on January 1, 2006:
Plot data gathered on the 15^(th) day of each month starting in January:
Dates determined by an ending date and a step:
Axes origin specified with a date string coordinate:
Prepend a year to create dates from lists:
Define functions for interpreting ambiguous date strings:
Specify the format of date ticks as DateString elements:
Place text using a shortened DateList as the coordinate:
Fill from data points to the bottom:
Fill to the bottom with points joined:
Give explicit dates for horizontal ticks:
Use different date specifications:
Include a specific tick label, length, and style:
Include grid lines at specific dates:
Make the first grid line Blue:
Plot data with points joined by a line:
Plot multiple datasets with points joined:
Only join points for the first dataset:
Restrict the range of dates to plot over:
Place text using a shortened DateList as the coordinate:
Give explicit dates for horizontal ticks:
Show without grid lines:
Give explicit dates as date strings or absolute times:
Include a specific tick label, length, and style:
Get stock price data:
A sample data point:
Plot data gathered at regular intervals and stored without explicit dates:
Modify the ticks:
Plot annual oil consumption since 1980:
Date coordinates are plotted as absolute times:
A ListPlot using the AbsoluteTime values:
DateListLogPlot plots date-based data on a logarithmic scale:
New in 6