Wolfram Language & System 10.3 (2015)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)

DateListStepPlot

DateListStepPlot[{{date1,v1},{date2,v2},}]
plots the values in steps at a sequence of dates.

DateListStepPlot[{v1,v2,},datespec]
plots the values in steps with dates at equal intervals specified by datespec.

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

DateListStepPlot[,step]
plots using steps specified by step.

Details and OptionsDetails and Options

  • DateListStepPlot plots the data so that each point, including the first and last, is part of a horizontal step.
  • Possible forms of include:
  • DateObject,TimeObjectdate or time object
    "string"DateString specification
    {y,m,d,h,m,s}DateList specification
    {y},{y,m},{y,m,d},shortened date list
    tabsolute time given as a single number
  • 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 increments
    {start,Automatic,Δt}dates beginning with start in increments Δt
    {Automatic,end,Δt}dates ending with end in increments Δt
    startdates with increments determined by the form of start
  • The Δt in datespec can be a date list specification or any of the special forms , , , , , , , , and .
  • If no explicit Δt is given, the increments used will be the smallest time unit specified explicitly in start.
  • The following step specifications can be given:
  • Rightstep extends to the right
    Leftstep extends to the left
    Centerstep extends to the centers between neighboring points
  • Data values can be given in the following forms:
  • via real-valued number
    Quantity[vi,unit]a quantity with a unit
  • Values that are not of the form above are taken to be missing and give gaps in the curve.
  • The have the following forms and interpretations:
  • <|"k1"v1,"k2"v2,|>values
    SparseArrayvalues as a normal array
    TimeSeries, EventSeriestime-value pairs
    QuantityArraymagnitudes
    w[datai]wrapper w for dataset
  • The following wrappers w can be used for the :
  • Annotation[datai,label]provide an annotation
    Button[datai,action]define an action to execute when the curve is clicked
    EventHandler[datai,]define a general event handler for the curve
    Hyperlink[datai,uri]make the curve act as a hyperlink
    Legended[datai,]identify the curve in a legend
    PopupWindow[datai,cont]attach a popup window to the curve
    StatusArea[datai,label]display in the status area when the curve is moused over
    Style[datai,opts]show the curve using the specified styles
    Tooltip[datai,label]attach an arbitrary tooltip to the curve
  • DateListStepPlot takes the same options as Graphics, with the following additions and changes:
  • AspectRatio1/GoldenRatioratio of height to width
    AxesTruewhether to draw axes
    ClippingStyleNonewhat to draw when lines are clipped
    ColorFunctionAutomatichow to determine the coloring of lines
    ColorFunctionScalingTruewhether to scale arguments to ColorFunction
    DateFunctionAutomatichow to convert dates to standard form
    DateTicksFormatAutomaticformat for date tick labels
    FillingNonefilling under each line
    FillingStyleAutomaticstyle to use for filling
    FrameTruewhether to put a frame around the plot
    JoinedTruewhether to join horizontal segments
    MeshNonehow many mesh points to draw on each line
    MeshFunctions{#1&}how to determine the placement of mesh points
    MeshShadingNonehow to shade regions between mesh points
    MeshStyleAutomaticthe style for mesh points
    MethodAutomaticthe method to use
    PerformanceGoal$PerformanceGoalaspects of performance to try to optimize
    PlotLegendsNonelegends for datasets
    PlotMarkersNonemarkers to use to indicate each point
    PlotRangeAutomaticrange of values to include
    PlotRangeClippingTruewhether to clip at the plot range
    PlotStyleAutomaticgraphics directives to determine the style of each line
    PlotTheme$PlotThemeoverall theme for the plot
    TargetUnitsAutomaticunits to display in the plot
  • With the default setting Joined->True, the steps are joined using vertical line segments. Use Joined->False to draw only the steps.
  • Use Mesh->Full to draw the points in addition to the steps.

ExamplesExamplesopen allclose all

Basic Examples  (4)Basic Examples  (4)

Create a plot that stays level until the next date:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=

Draw the date points in the middle of the steps:

In[3]:=
Click for copyable input
Out[3]=

Plot monthly values, starting in August 2000:

In[1]:=
Click for copyable input
Out[1]=

Plot multiple curves with a legend:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=

Plot curves without the vertical segments:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
Introduced in 2015
(10.3)