| TEMPLATE Procedure: Plot Statements (Experimental) |
BANDPLOT X= numeric-column |
expression
|
BANDPLOT Y= numeric-column |
expression
|
| Usage Information |
Band Plot
![[Band Plot]](./images/bandplot.gif)
| Requirement: |
A band plot can specify an X column with Y upper and lower limits, or a Y column with X upper and lower limits. If you specify the X argument, you must specify YLIMITLOWER and YLIMITUPPER arguments. If you specify the Y argument, you must specify XLIMITLOWER and XLIMITUPPER arguments. |
| Restriction: |
When you use a BANDPLOT statement to display prediction or confidence limits, a band plot must be used with another plot that specifies a fitted model, such as a series, step, or needle plot. In these cases, the band does not include the model line, so the MODELNAME= option must be used on the BANDPLOT statement to identify the model from which to derive the interpolation for the band. The name specified on the MODELNAME= option would be the name assigned to the other plot on its NAME= option. The upper and lower limits would be specified by numeric columns. |
| Tip: |
You can use the BANDPLOT statement in displays that are independent of other plots. For example, a band plot can be used to define yellow and green areas in an OVERLAY LAYOUT statement that also contains a scatter plot, implying concern for any of the scatter plot values that fall in the yellow area and comfort for any values that fall in the green area. For this use, the upper and lower limits would be specified by a constant. |
| Required Arguments |
specifies X values.
| Requirement: | If you use the X= argument, then you must also use the YLIMITLOWER= and the YLIMITUPPER= arguments to specify the lower and upper Y lines for the band. |
specifies a number representing the lower Y value or column of values for the lower Y line.
| Requirement: | The YLIMITLOWER= argument must be used when X values are specified. |
| Interaction: | If a number is specified, then a horizontal line is assumed. |
specifies a number representing the upper Y value or column of values for the upper Y line.
| Requirement: | The YLIMITUPPER= argument must be used when X values are specified. |
| Interaction: | If a number is specified, then a horizontal line is assumed. |
specifies Y values.
| Requirement: | If you use the Y= argument, then you must also use the XLIMITLOWER= and the XLIMITUPPER= arguments to specify the lower and upper X lines for the band. |
specifies a number representing the lower X value or column of values for the lower X line.
| Requirement: | The XLIMITLOWER= argument must be used when Y values are specified. |
| Interaction: | If a number is specified, then a vertical line is assumed. |
specifies a number representing the upper X value or column of values for the upper X line.
| Requirement: | The XLIMITUPPER= argument must be used when Y values are specified. |
| Interaction: | If a number is specified, then a vertical line is assumed. |
| 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. |
| DATATRANSPARENCY= number | Specifies the degree of the transparency of the band. |
| EXTREME= boolean | Specifies whether a constant band is to be drawn to the area bounded by the axes. |
| FILL= boolean | Specifies whether to fill the area between the lines of the band. |
| FILLCOLOR= color | style-reference | Specifies the color of the area between the lines of the band. |
| GRIDTRANSPARENCY= number | Specifies the degree of the transparency of the grid lines. |
| GROUP= column | Creates a separate band plot for each unique group value of the specified column. |
| INDEX= integer-column | Specifies indices for remapping the assignment of color and the line pattern to group values. |
| LEGENDLABEL= 'string' | Specifies the label of the legends. |
| LINECOLOR= color | style-reference | Specifies the color of the band lines. |
| LINEPATTERN= line | style-reference | Specifies the line pattern of the band lines. |
| LINES= boolean | Specifies whether the band lines are displayed. |
| LINETHICKNESS= dimension | style-reference | Specifies the thickness of the band lines. |
| MODELNAME= 'string' | Specifies the name of the plot from which to derive the interpolation of the band. |
| NAME= 'string' | Assigns a name to a plot statement for reference in other template statements. |
| TIP= ( column-list ) | Specifies the information to display when the cursor is positioned over a graph element. |
| TRANSPARENCY= number | Specifies the degree of the transparency of all elements of the graph. |
| WALLTRANSPARENCY= number | Specifies the degree of the transparency of the plot 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 bands. |
| XMIN= number | Specifies the minimum X data value to use in the bands. |
| 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 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. |
| YGRID= boolean | Specifies whether grid lines drawn at the tick marks. |
| YMAX= number | Specifies the maximum Y data value to use in the bands. |
| YMIN= number | Specifies the minimum Y data value to use in the bands. |
| 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 |
specifies the degree of the transparency of the band.
| Default: | 0 |
| Range: | 0 (opaque) to 1 (entirely transparent) |
| Interaction: | The DATATRANSPARENCY= option overrides the TRANSPARENCY= option for the band. |
| See also: | TRANSPARENCY= option |
specifies whether a constant band is to be drawn to the area bounded by the axes.
| Default: | FALSE |
| Requirement: | When the EXTREME= option is used in the BANDPLOT statement, constants must be specified for the upper and lower band limits. |
| Interaction: | The EXTREME= option is not affected by the XMAX=, XMIN=, YMAX=, or YMIN= option. |
| Tip: | If the EXTREME= option is not specified, then there can be a small gap between the line and the axis. The gap is controlled by the axis offset. If the offset is set to 0, then there is no gap. |
specifies whether to fill the area between the lines of the band.
| Default: | FALSE |
specifies the color of the area between the lines of the band.
| Default: |
If the GROUP= option is not specified,
then the default fill color is specified by the GraphDataDefault:Foreground
style reference.
If the GROUP= option is specified, then the fill color is specified by the ContrastColor style attribute on the GraphData1 - GraphData12 style elements. |
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 band 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 line color and line pattern. |
| Restriction: | The GROUP= option can only be used when a numeric column is specified for the upper or lower limits of the band plot. |
| Tip: | The representations that are used to identify the groups can be overridden individually. For example, each distinct group value is represented by a different line pattern for the band lines, but the LINEPATTERN= option could be used to assign the same line pattern to all lines. |
specifies indices for remapping the assignment of the color and the line pattern to group values.
| Restriction: | The INDEX= option must be used with the GROUP= option. If the GROUP= option is not specified, then the INDEX= option is ignored. |
| Interaction: | If the INDEX= option is not used, then the group values are mapped in the order of the data. |
specifies the label of the legends.
| Default: | No label |
| Interaction: | The GROUP= option overrides the LEGENDLABEL= option. |
specifies the color of the band lines.
| Default: |
If the GROUP= option is specified,
then the color is specified by the contrast color in the GraphData1 - GraphData12
style elements.
If the GROUP= option is not specified, then the color is specified by the GraphDataDefault:ContrastColor style reference. |
specifies the line pattern of the band 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 whether the band lines are displayed.
| Default: | TRUE |
| Interaction: | The LINES= option applies to the band limits and can be used to display a filled band without displaying the upper and lower limit lines. When LINES=FALSE, the FILL= option should be used to specify a fill for the band area. |
| Interaction: | If LINES=FALSE and the FILL= option is not specified, then a default fill is used to prevent an empty display. |
| Interaction: | If LINES=FALSE and FILL=FALSE, then the lines are drawn to prevent an empty display. |
specifies the thickness of the band lines.
| Default: | 1 px |
specifies the name of the plot from which to derive the interpolation for the band.
| Restriction: | The MODELNAME= option can only be used when a numeric column is specified for the upper or lower limits of a band plot . |
| Requirement: | The string value specified by the MODELNAME= option must be the name that has been assigned to the associated plot by the NAME= option on the plot statement. |
| Tip: | If the MODELNAME= option is not specified, then the interpolation is assumed to be consistent with a SERIES plot. |
| Tip: | When the MODELNAME= option is used, the band plot forms prediction or confidence limits for the plot that supplies the fitted model. |
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. |
specifies the information to display when the cursor is positioned over a graph element.
| Default: | All of the variables specified for the graph. |
| Requirement: | You can activate tool tips in a SAS program by specifying 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 all of the elements of the graph.
| Default: | 0 |
| Range: | 0 (opaque) to 1 (entirely transparent) |
| Interaction: | You can specify the transparency of the bands, the background, the grid, and the wall individually with the BACKTRANSPARENCY=, DATATRANSPARENCY=, GRIDTRANSPARENCY=, and WALLTRANSPARENCY= options. |
| Interaction: | In a LAYOUT OVERLAY block, the TRANSPARENCY= option only affects the bands. The LAYOUT OVERLAY statement specifies 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 bands.
| Default: | 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 bands. |
| Interaction: | The XMAX= option does not affect the EXTREME= option. The EXTREME= option extends the line. |
specifies the minimum X data value to use in the bands.
| Default: | 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 bands. |
| Interaction: | The XMIN= option does not affect the EXTREME= option. The EXTREME= option extends the line. |
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 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 bands.
| Default: | 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 bands. |
| Interaction: | The YMAX= option does not affect the EXTREME= option. The EXTREME= option extends the line. |
specifies the minimum Y data value to use in the bands.
| Default: | 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 bands. |
| Interaction: | The YMIN= option does not affect the EXTREME= option. The EXTREME= option extends the line. |
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. |