| TEMPLATE Procedure: Plot Statements (Experimental) |
| STEPPLOT Y= numeric-column | expression X= column | expression < / option(s)> ; |
| Usage Information |
Step Plot
![[Step Plot]](./images/stepplot.gif)
| Interaction: |
Unless the SORT= option is used to change the order of the data, the STEPPLOT statement uses X values in data order. |
| Required Arguments |
specifies the column of the X values.
specifies the column of the Y values.
| Options |
| Option | Description |
|---|---|
| BACKGROUND= color | style-reference | Specifies the background color of the graph. |
| BACKTRANSPARENCY= number | Specifies the degree of the transparency of the background color. |
| BREAK= boolean | Breaks the plot line at the occurrences of the missing values of the Y variable. |
| DATALABEL= column | Specifies the labels of the data points. |
| DATALABELCOLOR= color | style-reference | Specifies the color of the data labels. |
| DATALABELFONTFAMILY= 'string' | style-reference | Specifies the family of the font of the data labels. |
| DATALABELFONTSIZE= dimension | style-reference | Specifies the size of the font of the data labels. |
| DATALABELFONTSTYLE= NORMAL | ITALIC | style-reference | Specifies the style of the font of the data labels. |
| DATALABELFONTWEIGHT= NORMAL | BOLD | style-reference | Specifies the weight of the font of the data labels. |
| DATALABELFORMAT= format | Specifies the format of the data labels. |
| DATATRANSPARENCY= number | Specifies the degree of the transparency of the markers and step lines. |
| GRIDTRANSPARENCY= number | Specifies the degree of the transparency of the grid lines. |
| GROUP= column | Creates a separate step plot for each unique group value of the specified column. |
| INDEX= integer-column | Specifies indices for remapping the assignment of the color, marker symbols, and line pattern to group values. |
| JOIN= boolean | Specifies whether the steps are connected. |
| JUSTIFY= ( LEFT | CENTER | RIGHT ) | Specifies the location of the data point relative to the step. |
| LABELTRANSPARENCY= number | Specifies the degree of the transparency of the data labels. |
| LEGENDLABEL= 'string' | Specifies the label of the legends. |
| LINECOLOR= color | style-reference | Specifies the color of the step lines. |
| LINEPATTERN= line | style-reference | Specifies the pattern of the step lines. |
| LINETHICKNESS= dimension | style-reference | Specifies the thickness of the step lines. |
| MARKERCOLOR= color | style-reference | Specifies the colors of the data markers. |
| MARKERS= boolean | Specifies whether the data markers are displayed. |
| MARKERSIZE= dimension | style-reference | Specifies the width of the marker, which is equal to the height of the marker. |
| MARKERSYMBOL= marker | style-reference | Specifies the symbols of the data markers. |
| NAME= 'string' | Assigns a name to a plot statement for reference in other template statements. |
| SORT= X | NONE | Determines whether the data points are sorted according to the values of the column specified for the X variable, or displayed in the order in which they appear in the X column. |
| TIP= ( column-list ) | Specifies the information to display when the cursor is positioned over a marker or a horizontal step line. |
| TRANSPARENCY= number | Specifies the degree of the transparency of the markers, data labels, step lines, background, grid, wall, and axis features, if displayed in a graph. |
| WALLTRANSPARENCY= number | Specifies the degree of the transparency of the graph wall. |
| XAXIS= X | X2 | Specifies whether data is mapped to the primary X axis or the secondary X (X2) axis. |
| XAXISOPTS= ( axis-options ) | Specifies one or more X axis options. |
| XGRID= boolean | Specifies whether the grid lines are drawn at the tick marks. |
| XMAX= number | Specifies the maximum X data value to use in the display of data. |
| XMIN= number | Specifies the minimum X data value to use in the display of data. |
| XOFFSETMAX= number | Specifies an offset to add to the end that represents high data values on the primary X axis. |
| XOFFSETMIN= number | Specifies an offset to add to the end that represents low data values on the of the primary X axis. |
| YAXIS= Y | Y2 | Specifies whether data is mapped to the primary Y axis or the secondary Y (Y2) axis. |
| YAXISOPTS= ( axis-options ) | Specifies one or more Y axis options. |
| YERRORLOWER= numeric-column | Specifies the values of the lower endpoints on the Y error bars. |
| YERRORUPPER= numeric-column | Specifies the values of the upper endpoints of the Y error bars. |
| YGRID= boolean | Specifies whether the grid lines drawn at the tick marks. |
| YMAX= number | Specifies the maximum Y data value to use in the display of data. |
| YMIN= number | Specifies the minimum Y data value to use in the display of data. |
| YOFFSETMAX= number | Specifies an offset to add to the end that represents high data values on the primary Y axis. |
| YOFFSETMIN= number | Specifies an offset to add to the end that represents low data values on the primary Y axis. |
specifies the background color of the graph.
| Default: | Specified by the GraphBackground:Background style reference. |
| Interaction: | Ignored in a LAYOUT OVERLAY block. For information, see Ignored Plot Options in a LAYOUT OVERLAY Block. |
specifies the degree of the transparency of the background color.
| Default: | 0 |
| Range: | 0 (opaque) to 1 (entirely transparent) |
| Interaction: | The BACKTRANSPARENCY= option overrides the TRANSPARENCY= option for the background. |
| Interaction: | Ignored in a LAYOUT OVERLAY block. For information, see Ignored Plot Options in a LAYOUT OVERLAY Block. |
| See also: | TRANSPARENCY= option |
breaks the plot line at occurrences of missing values of the Y variable.
| Default: | FALSE |
| Tip: | If BOOLEAN=FALSE, missing values are skipped and the line continues to the next point. |
specifies the labels of the data points.
| Default: | No labels are displayed. |
| Tip: | The position of the labels are adjusted to prevent the labels from overlapping. |
specifies the color of the data labels.
| Default: | Specified by the GraphDataDefault:ContrastColor style reference. |
| Interaction: | The DATALABELCOLOR= option overrides the GROUP= option color assignments for the labels. |
| Tip: | When the GROUP= option is used, each distinct group value is represented by a different color. The data labels that are associated with the group are assigned the group color. The DATALABELCOLOR= option can be used to specify a single color for all of the data labels in a graph, without affecting items that have the group color, such as the lines and marker symbols. |
specifies the family of the font of the data labels.
| Default: | Specified by the GraphDataText:Font_Face style reference. |
| Restriction: | You must specify one font family name. You cannot specify a list of font family names. |
specifies the size of the font of the data labels.
| Default: | Specified by the GraphDataText:Font_Size style reference. |
specifies the style of the font of the data labels.
| Default: | Specified by the GraphDataText:Font_Style style reference. |
specifies the weight of the font of the data labels.
| Default: | Specified by the GraphDataText:Font_Weight style reference. |
specifies the format of the data labels.
| Default: | The format of the data label uses the format of the column. For an unformatted numeric column, the data label uses the BEST12 format. |
| Restriction: | The w.d format must be specified using the Fw.d format. |
specifies the degree of the transparency of the markers and step lines.
| Default: | 0 |
| Range: | 0 (opaque) to 1 (entirely transparent) |
| Interaction: | The DATATRANSPARENCY= option overrides the TRANSPARENCY= option for the graph elements in the data area. |
| See also: | TRANSPARENCY= option |
specifies the degree of the transparency of the grid lines.
| Default: | 0 |
| Range: | 0 (opaque) to 1 (entirely transparent) |
| Interaction: | The GRIDTRANSPARENCY= option overrides the TRANSPARENCY= option for the grid lines. |
| Interaction: | Ignored in a LAYOUT OVERLAY block. For information, see Ignored Plot Options in a LAYOUT OVERLAY Block. |
| See also: | TRANSPARENCY= option |
creates a separate step plot for each unique group value of the specified column.
| Default: | Each distinct group value is represented in the graph by a different combination of color, marker symbol, and line pattern (as appropriated for the graph), and the step lines are joined within each group but not across the groups. |
| Tip: | If error bars are displayed, then each error bar is assigned the color and the line pattern of its group. |
| Tip: | The representations that are used to identify the groups can be overridden individually. For example, in plots with marker symbols, each distinct group value is represented by a different line pattern, but the LINEPATTERN= option could be used to assign the same pattern to all the step lines of the plot. |
specifies indices for remapping the assignment of color, marker symbols, and line pattern to group values.
| Interaction: |
If the INDEX= option is not used,
then the group values are mapped in the order of the data.
The INDEX= option must be used with the GROUP= option. If the GROUP= option is not specified, then the INDEX= option is ignored. |
specifies whether the steps are connected.
| Default: | TRUE |
specifies the location of the data point relative to the step.
| Default: | LEFT |
| Tip: |
The following illustration shows how the
data points and the steps appear for each of the JUSTIFY= option
values.
|
specifies the degree of the transparency of the data labels.
| Default: | 0 |
| Range: | 0 (opaque) to 1 (entirely transparent) |
| Interaction: | The LABELTRANSPARENCY= option overrides the TRANSPARENCY= option for the data labels. |
specifies the label of the legends.
| Default: | An empty string. |
| Interaction: | The GROUP= option overrides the LEGENDLABEL= option. |
specifies the color of the step lines.
| Default: |
If the GROUP= option is not specified,
then the color is specified by the GraphDataDefault:ContrastColor style reference.
If the GROUP= option is specified, then the color is specified by the ContrastColor attributes in the GraphData1 - GraphData12 style elements. |
specifies the pattern of the step lines.
| Default: |
If the GROUP= option is not specified,
then a solid line pattern is used.
If the GROUP= option is specified, then the line patterns are specified by the LineStyle attribute in the GraphData1 - GraphData12 style elements.
If the GraphData1 - GraphData12 style elements do not set the LineStyle attribute, then a default sequence of line patterns is used. |
| Interaction: | The LINEPATTERN= option overrides the default line mapping for group values. |
specifies the thickness of the step lines.
| Default: | 1 px |
specifies the color of the data markers.
| Default: |
If the GROUP= option is not specified,
then the color is specified by the GraphDataDefault:ContrastColor style reference.
If the GROUP= option is specified, then the color is specified by the ContrastColor attributes in the GraphData1 - GraphData12 style elements. |
| Interaction: | The MARKERCOLOR= option overrides the marker colors specified by the GROUP= option. The marker symbol then distinguishes groups. |
specifies whether the data markers are displayed.
| Default: | FALSE |
specifies the width of the marker, which is equal to the height of the marker.
| Default: | 10px |
specifies the symbols of the data markers.
| Default: |
CIRCLE
If the GROUP= option is used, then the STANDARD marker set is used. |
assigns a name to a plot statement for reference in other template statements.
| Restriction: | The string specified by the NAME= option must be unique within the template. |
| Restriction: | The string specified by the NAME= option cannot contain embedded spaces. |
| Tip: | The NAME= option is used mostly in the DISCRETELEGEND statement in order to coordinate the use of colors, marker symbols, and line patterns between the graph and the legend. |
| Tip: | string is case sensitive. |
determines whether the data points are sorted according to the values of the column specified for the X variable, or displayed in the order in which they appear in the X column.
| Default: | NONE |
specifies the information to display when the cursor is positioned over a marker or a horizontal step line.
| Default: | All of the variables specified for the graph. |
| Requirement: | You can activate tool tips in a SAS program by using an ODS GRAPHICS statement that has IMAGEFMT=STATICMAP specified. |
| Requirement: | Tool tips are only available for graphs that are written to the ODS HTML destination. Tool tips are only displayed if they are activated by the SAS program that generates the ODS graphics output. |
specifies the degree of the transparency of the markers, data labels, step lines, background, grid, wall, and axis features, if displayed in a graph.
| Default: | 0 |
| Range: | 0 (opaque) to 1 (entirely transparent) |
| Interaction: | The transparency of the background, markers, and step lines, data labels, grid, and wall can be set individually with the BACKTRANSPARENCY=, DATATRANSPARENCY=, GRIDTRANSPARENCY=, LABELTRANSPARENCY=, and WALLTRANSPARENCY= options. The value specified by the TRANSPARENCY= option is only applied to the transparencies that you do not specify individually. |
| Interaction: | In a LAYOUT OVERLAY block, the TRANSPARENCY= option only affects the markers, step lines, and data labels. The LAYOUT OVERLAY statement settings specify the transparency of the background, grid, and wall. |
specifies the degree of the transparency of the plot wall.
| Default: | 0 |
| Range: | 0 (opaque) to 1 (entirely transparent) |
| Interaction: | The WALLTRANSPARENCY= option overrides the TRANSPARENCY= option for the graph wall. |
| Interaction: | Ignored in a LAYOUT OVERLAY block. For information, see Ignored Plot Options in a LAYOUT OVERLAY Block. |
| See also: | TRANSPARENCY= option |
specifies whether data is mapped to the primary X axis or to the secondary X (X2) axis.
| Default: | X |
| Interaction: |
Outside of a LAYOUT OVERLAY block,
an individual plot can have only one X axis. The XAXIS= option of a plot specifies
whether the axis is in the primary (bottom) or secondary (top) position. The
XAXISOPTS= option of a plot specifies whether the axis is displayed and specifies
the axis characteristics.
Within a LAYOUT OVERLAY block, multiple plots can share a primary axis and a secondary axis. The primary and secondary axes can have different scales, and the XAXIS= option for a particular plot can map data to either axis. The XAXISOPTS= and X2AXISOPTS= options of a LAYOUT OVERLAY statement specify whether the axes are displayed, and specify the axis characteristics. |
specifies one or more X axis options.
| Requirement: | The list of axis options must be enclosed in parentheses and separated by spaces. |
| Interaction: | Ignored in a LAYOUT OVERLAY block. For information, see Ignored Plot Options in a LAYOUT OVERLAY Block. |
specifies whether the grid lines are drawn at the tick marks.
| Default: | FALSE | ||||||
| Interaction: | Ignored in a LAYOUT OVERLAY block. For information, see Ignored Plot Options in a LAYOUT OVERLAY Block. | ||||||
| Interaction: |
If you specify or use the default
XGRID= option for the OVERLAY LAYOUT statement, then the XGRID= option specified
for a graph is ignored. Default characteristics for the grid lines are specified
from the following attributes on the GraphGridLines style element:
|
specifies the maximum X data value to use in the display of data.
| Default: | The maximum X value in the data. |
| Restriction: | If the data contains values greater than the number that is specified for the XMAX= option, then the data values are excluded from the plot. |
specifies the minimum X data value to use in the display of data.
| Default: | The minimum X value in the data. |
| Restriction: | If the data contains values that are less than the number specified for the XMIN= option, then the data values are excluded from the plot. |
specifies an offset to add to the end that represents high data values on the primary X axis. The offset is expressed as a decimal proportion of the full axis length. For a continuous axis, the offset is added to the highest data value or highest tick value, whichever is greater. For a discreet axis, the offset is added to the highest data value, which is always the highest tick value.
| Default: | Generated as suitable for the graph. |
| Range: | 0 - 1 |
| Interaction: | For a continuous axis, the offset is added after any threshold adjustment is made to the axis. |
| Interaction: | Ignored in a LAYOUT OVERLAY block. For information, see Ignored Plot Options in a LAYOUT OVERLAY Block. |
| Main discussion: | THRESHOLDMAX= sub-option. |
specifies an offset to add to the end that represents low data values on the primary X axis. The offset is expressed as a decimal proportion of the full axis length. For a continuous axis, the offset is added to the lowest data value or lowest tick value, whichever is less. For a discreet axis, the offset is added to the lowest data value, which is always the lowest tick value.
| Default: | Generated as suitable for the graph. |
| Range: | 0 - 1 |
| Interaction: | For a continuous axis, the offset is added after any threshold adjustment is made to the axis. |
| Interaction: | Ignored in a LAYOUT OVERLAY block. For information, see Ignored Plot Options in a LAYOUT OVERLAY Block. |
| Main discussion: | THRESHOLDMAX= sub-option. |
specifies whether data is mapped to the primary Y axis or to the secondary Y (Y2) axis.
| Default: | Y |
| Interaction: |
Outside of a LAYOUT OVERLAY block,
an individual plot can have only one Y axis. The YAXIS= option of a plot
specifies whether the axis is in the primary (left) or secondary (right) position.
The YAXISOPTS= option of a plot specifies whether the axis is displayed and
specifies the axis characteristics.
Within a LAYOUT OVERLAY block, multiple plots can share a primary axis and a secondary axis. The primary and secondary axes can have different scales, and the YAXIS= option for a particular plot can map data to either axis. The YAXISOPTS= and Y2AXISOPTS= options of a LAYOUT OVERLAY statement specify whether the axes are displayed, and specify the axis characteristics. |
specifies one or more Y axis options.
| Requirement: | The list of axis options must be enclosed in parentheses and separated by spaces. |
| Interaction: | Ignored in a LAYOUT OVERLAY block. For information, see Ignored Plot Options in a LAYOUT OVERLAY Block. |
specifies the values of the lower endpoints on the Y error bars.
| Default: | The lower segment of the error bars is not drawn. |
| Tip: | The values are actual values rather than relative values. |
specifies the values of the upper endpoints on the Y error bars.
| Default: | The upper segment of the error bars is not drawn. |
| Tip: | The values are actual values rather than relative values. |
specifies whether grid lines are drawn at the tick marks.
| Default: | FALSE | ||||||
| Interaction: | Ignored in a LAYOUT OVERLAY block. For information, see Ignored Plot Options in a LAYOUT OVERLAY Block. | ||||||
| Interaction: |
If you specify or use the default
YGRID= option for the OVERLAY LAYOUT statement, then the YGRID= option specified
for a graph is ignored. Default characteristics for the grid lines are specified
from the following attributes on the GraphGridLines style element:
|
specifies the maximum Y data value to use in the display of data.
| Default: | The maximum Y value in the data. |
| Restriction: | If the data contains values that are greater than the number specified for the YMAX= option, then the data values are excluded from the plot. |
specifies the minimum Y data value to use in the display of data.
| Default: | The minimum Y value in the data. |
| Restriction: | If the data contains values that are less than the number specified for the YMIN= option, then the data values are excluded from the plot. |
specifies an offset to add to the end that represents high data values on the primary Y axis. The offset is expressed as a decimal proportion of the full axis length. For a continuous axis, the offset is added to the highest data value or highest tick value, whichever is greater. For a discreet axis, the offset is added to the highest data value, which is always the highest tick value.
| Default: | Generated as suitable for the graph. |
| Range: | 0 - 1 |
| Interaction: | For a continuous axis, the offset is added after any threshold adjustment is made to the axis. |
| Interaction: | Ignored in a LAYOUT OVERLAY block. For information, see Ignored Plot Options in a LAYOUT OVERLAY Block. |
| Main discussion: | THRESHOLDMAX= sub-option. |
specifies an offset to add to the end that represents low data values on the primary Y axis. The offset is expressed as a decimal proportion of the full axis length. For a continuous axis, the offset is added to the lowest data value or lowest tick value, whichever is less. For a discreet axis, the offset is added to the lowest data value, which is always the lowest tick value.
| Default: | Generated as suitable for the graph. |
| Range: | 0-1 |
| Interaction: | For a continuous axis, the offset is added after any threshold adjustment is made to the axis. |
| Interaction: | Ignored in a LAYOUT OVERLAY block. For information, see Ignored Plot Options in a LAYOUT OVERLAY Block. |
| Main discussion: | THRESHOLDMAX= sub-option. |