DateListStepPlot

DateListStepPlot[{{date1,v1},{date2,v2},}]

plots the values vi in steps at a sequence of dates.

DateListStepPlot[{v1,v2,},datespec]

plots the values vi in steps with dates at equal intervals specified by datespec.

DateListStepPlot[tseries]

plots the time series tseries.

DateListStepPlot[{data1,data2,}]

plots data from all the datai.

DateListStepPlot[,step]

plots using steps specified by step.

DateListStepPlot[{,w[datai],}]

plots data datai with features defined by the symbolic wrapper w.

Details and Options

  • DateListStepPlot plots the data so that each point, including the first and last, is part of a horizontal step.
  • Possible forms of datei 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 {y,1,1,0,0,0}.
  • 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 {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.
  • 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 vi can be given in the following forms:
  • via real-valued number
    Quantity[vi,unit]a quantity with a unit
  • Values vi that are not of the preceding form are taken to be missing and give gaps in the curve.
  • The listi have the following forms and interpretations:
  • <|"k1"v1,"k2"v2,|>values {v1,v2,}
    SparseArrayvalues as a normal array
    TimeSeries, EventSeriestime-value pairs
    QuantityArraymagnitudes
    w[datai]wrapper w for dataset datai
  • The following wrappers w can be used for the listi:
  • Annotation[datai,label]provide an annotation
    Button[datai,action]define an action to execute when the curve is clicked
    Callout[datai,label]label the data with a callout
    EventHandler[datai,]define a general event handler for the curve
    Hyperlink[datai,uri]make the curve act as a hyperlink
    Labeled[e,]display the curve with labeling
    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
    PlotLabelNoneoverall lable for the plot
    PlotLabelsNonelabels for data
    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
    ScalingFunctionsNonehow to scale individual coordinates
    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.
  • ScalingFunctions->"scale" scales the coordinate; ScalingFunctions{"scalex","scaley"} scales both and coordinates.
  • All explicit coordinates in Prolog, Epilog, Ticks, etc. are taken to be dates. »

Examples

open allclose all

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]=

Add labels for each data:

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

Plot curves without the vertical segments:

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

Scope  (40)

Options  (47)

Applications  (7)

Properties & Relations  (4)

See Also

DateListPlot  ListStepPlot  DateHistogram  DateListLogPlot  TimelinePlot  ListLinePlot

Introduced in 2015
(10.3)
| Updated in 2016
(11.0)