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[],TimeObject[]date 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
    IntervalMarkersAutomatichow to render uncertainties
    IntervalMarkersStyleAutomaticstyle for uncertainty elements
    FrameTruewhether to put a frame around the plot
    JoinedTruewhether to join horizontal segments
    LabelingSizeAutomaticmaximum size of callouts and labels
    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
    PlotLayout"Overlaid"how to position 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
  • Possible settings for PlotLayout that show multiple curves in a single plot panel include:
  • "Overlaid"show all the data overlapping
    "Stacked"accumulate the data
    "Percentile"accumulate and normalize the data
  • 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 the 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:

Draw the date points in the middle of the steps:

Plot monthly values, starting in August 2000:

Plot multiple curves with a legend:

Add labels for each data:

Plot curves without the vertical segments:

Scope  (43)

Data  (11)

Steps are drawn through the date points:

Plot time and event series:

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 on the 15^(th) day of each month, starting in January:

Dates given as DateString specifications:

Use AbsoluteTime specifications:

Show multiple time series:

The plot range is selected automatically:

Use PlotRange to focus in on areas of interest:

Use ScalingFunctions to scale the axes:

Special Data  (6)

Use Quantity to include units with the data:

Plot data in a QuantityArray:

Specify the units used with TargetUnits:

Numeric values in an Association are used as the coordinates:

Numeric keys and values in an Association are used as the and coordinates:

Plot TimeSeries directly:

The weights in WeightedData are ignored:

Use a sparse array to represent the values:

Wrappers  (8)

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

Wrappers can be nested:

Use the value of each point as a tooltip:

Use a specific label for all the points:

Use PopupWindow to provide additional drilldown information:

Button can be used to trigger any action:

Use Annotation for dynamic action when the mouse enters the plot:

Use Hyperlink to jump to the specified link when clicked:

Use StatusArea to display a string in the status area of the current notebook:

Labeling and Legending  (12)

Label data with Labeled:

Label data with PlotLabels:

Place the label near the points at an date:

Use a scaled position:

Specify the text position relative to the point:

Label points with automatically positioned text:

Place the labels relative to the points:

Specify the maximum size of labels:

Use the full label:

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

Increasing the size of the plot will show more labels:

Label data automatically with Callout:

Place a label with a specific location:

Include legends for each curve:

Use Legended to provide a legend for a specific dataset:

Use Placed to change the legend location:

Use association keys as labels:

Presentation  (6)

Multiple curves are automatically colored to be distinct:

Provide explicit styling to different curves:

Include legends for each curve:

Use Legended to provide a legend for a specific dataset:

Provide an interactive Tooltip for the curve:

Use tooltips for each point:

Create filled plots:

Use shapes to distinguish different datasets:

Use a theme with simple ticks in a bold color scheme:

Use a theme with bright colors on a dark background:

Plot the data in a stacked layout:

Options  (52)

AspectRatio  (2)

Use the default aspect ratio:

Create a plot whose height and width are the same:

AxesLabel  (1)

Place a label on the axis:

AxesOrigin  (1)

The position of the axes is determined automatically:

Specify an explicit origin for the axes:

ClippingStyle  (1)

Omit clipped regions of the plot:

Show clipped regions as red at the bottom and the top:

Use PlotRange->All to not clip:

ColorFunction  (4)

Color with a named color scheme:

Color by scaled and coordinates:

Fill with the color used for the curve:

ColorFunction has higher priority than PlotStyle for coloring the curve:

ColorFunctionScaling  (2)

Color the line based on scaled value:

Color the line based on unscaled value:

DateFunction  (1)

By default, numeric times correspond to AbsoluteTime:

Interpret them as UnixTime:

DateTicksFormat  (1)

Control how dates are formatted in labels:

Filling  (2)

Explicitly specify the filling style for different plots:

Fills that overlap combine using opacity by default:

Fill from the second curve to the first:

Fill the region between two curves with light gray:

FillingStyle  (3)

Fill with red to the axis:

Fill with red below the axis and with blue above:

Fill with 50% opaque orange:

Use a variable filling style obtained from ColorFunction:

Frame  (1)

DateListStepPlot uses a frame by default:

Use axes instead of a frame:

FrameLabel  (1)

Place labels on the left edge of the frame:

Place labels on the bottom and left frame edges:

GridLines  (1)

Put grids across a plot:

Draw grid lines at the specific positions:

GridLinesStyle  (1)

Use dotted grid lines:

Joined  (1)

By default, the horizontal steps are joined by vertical segments:

Use Joined->False to create a plot without the vertical segments:

LabelingSize  (4)

Textual labels are shown at their actual sizes:

Image labels are automatically resized:

Specify a maximum size for textual labels:

Specify a maximum size for image labels:

Show image labels at their natural sizes:

Mesh  (1)

Use Mesh->Full to show the point for each step:

Use different mesh specifications:

MeshFunctions  (1)

Show seven mesh levels in the direction (red) and 10 mesh levels in the direction (blue):

MeshShading  (1)

Alternate red and blue segments of equal width in the direction:

MeshShading can be used with PlotStyle:

MeshStyle  (1)

Use different mesh directives:

PlotLabel  (1)

Add an overall label to the plot:

PlotLabels  (4)

Specify text to label curves:

Place the label above the data:

Place the label below the data at a specific date:

PlotLabels->Automatic uses keys of an association as data labels:

Use None to not add a label:

PlotLayout  (1)

By default, curves are overlaid on each other:

Plot the data in a stacked layout:

PlotLegends  (1)

Generate a legend using labels:

Legends use the same styles as the plot:

Place the legend inside the plot:

PlotMarkers  (2)

Use PlotMarkers->Automatic to show the point for each step:

Automatically use colors and shapes to distinguish sets of data:

Use text or typeset labels to distinguish datasets:

Use the same symbol for all the sets of data:

PlotRange  (1)

PlotRange is automatically calculated:

Show the whole dataset:

Choose the range to show:

PlotStyle  (2)

Use different plot style directives:

By default, different styles are chosen for multiple plots:

Explicitly specify the style for different plots:

PlotTheme  (1)

Use a theme with simple styling in a bright color scheme:

Change the color scheme:

Use a theme with minimal styling:

ScalingFunctions  (7)

By default, plots have linear scales in each direction:

Use a log scale in the direction:

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

Use a reciprocal scale in the direction:

Use a scale defined by a function and its inverse:

Positions in FrameTicks and GridLines are automatically scaled:

PlotRange is automatically scaled:

TargetUnits  (1)

Units are automatically extracted from the data:

Specify the units:

Applications  (7)

Plot a digital signal:

Visualize the number of items in an inventory:

Show the total precipitation of Boston Logan International Airport from January 1, 2000, to December 31, 2005:

Plot stepwise the GDP of France from 1985 to 2005:

Show values averaged over monthly intervals:

Show the simulation of a Poisson process with :

Show the simulation of a M/M/1 queue where the state is the number of jobs in the system:

Properties & Relations  (4)

DateListStepPlot does not interpolate between values:

Use DateListPlot to linearly interpolate between values:

Use cubic interpolation:

ListStepPlot does not interpret the values as being dates or times:

DateListStepPlot plots values associated with dates:

Use DateHistogram to plot counts from a list of dates:

Use TradingChart for a chart showing prices and volume for each date :

Wolfram Research (2015), DateListStepPlot, Wolfram Language function, https://reference.wolfram.com/language/ref/DateListStepPlot.html (updated 2019).

Text

Wolfram Research (2015), DateListStepPlot, Wolfram Language function, https://reference.wolfram.com/language/ref/DateListStepPlot.html (updated 2019).

BibTeX

@misc{reference.wolfram_2021_dateliststepplot, author="Wolfram Research", title="{DateListStepPlot}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/DateListStepPlot.html}", note=[Accessed: 13-June-2021 ]}

BibLaTeX

@online{reference.wolfram_2021_dateliststepplot, organization={Wolfram Research}, title={DateListStepPlot}, year={2019}, url={https://reference.wolfram.com/language/ref/DateListStepPlot.html}, note=[Accessed: 13-June-2021 ]}

CMS

Wolfram Language. 2015. "DateListStepPlot." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2019. https://reference.wolfram.com/language/ref/DateListStepPlot.html.

APA

Wolfram Language. (2015). DateListStepPlot. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DateListStepPlot.html