SGPLOT Procedure

HIGHLOW Statement

Creates a display of floating vertical or horizontal lines or bars that represent high and low values. The statement also gives you the option to display open and close values as tick marks and to specify a variety of plot attributes.
Note: This plot does not summarize data. If multiple observations have the same X or Y value, the observations are all plotted separately based on their values.
About High-Low Charts

Creating a High-Low Chart

Syntax

HIGHLOW X= variable | Y= variable
HIGH= numeric-variable LOW= numeric-variable
</option(s)>;

Summary of Optional Arguments

Group options
specifies the cluster width as a ratio of the maximum width.
specifies a variable that is used to group the data.
specifies how to display grouped data.
specifies the ordering of lines or bars within a group.
specifies that missing values of the group variable are not included in the plot.
HIGHLOW options
specifies the width of the bars as a ratio of the maximum possible width.
specifies the data for the CLOSE tick on the bar or line.
specifies an amount to offset all lines or bars from the category midpoints.
specifies whether the area fill is visible for bars.
specifies the appearance of the area fill for the bar.
specifies the type of arrowhead used at the high end of the bar or line.
specifies the label to be shown at the high end of the line or bar.
specifies the thickness of the bar when the X (or Y) data is numeric.
specifies the appearance of the labels in the plot when you use the HIGHLABEL= option, the LOWLABEL= option, or both options.
specifies the appearance of the outlines for the band.
specifies the type of arrowhead used at the low end of the bar or line.
specifies the label to be shown at the low end of the line or bar.
specifies the data for the OPEN tick on the bar or line.
specifies whether the outlines of the bars are visible.
specifies how the data is to be represented.
Plot options
specifies the value of the ID variable in an attribute map data set.
specifies a label that identifies the elements from the band plot in the legend.
specifies a name for the plot.
specifies the degree of transparency for the plot.
specifies a character variable that contains URLs for Web pages to be displayed when parts of the plot are selected within an HTML page.

Required Arguments

X= variable | Y=variable
specifies a variable that is used to plot the values along the N or Y axis.
Note:If you specify X=variable, then the statement creates vertical lines or bars on the X axis, with the HIGH and LOW values plotted along the Y axis. Conversely, if you specify Y=variable, then the statement creates horizontal lines or bars on the Y axis, with the HIGH and LOW values plotted along the X axis.
HIGH= numeric-variable
specifies the upper value for the floating lines or bars.
LOW= numeric-variable
specifies the lower value for the floating lines or bars.

Optional Arguments

ATTRID= variable
specifies the value of the ID variable in an attribute map data set. You specify this option only if you are using an attribute map to control visual attributes of the graph. For more information, see Using SG Attribute Maps to Control Visual Attributes.
BARWIDTH= numeric-value
specifies the width of the bars as a ratio of the maximum possible width. The maximum width is equal to the distance between the center of each bar and the centers of the adjacent bars. Specify a value from 0.0 (narrowest) to 1.0 (widest).
For example, if you specify a width of 1, then there is no distance between the bars. If you specify a width of .5, then the width of the bars is equal to the space between the bars.
Default:0.85
Requirement:This option is applicable only when the X or Y axis is discrete.
Interaction:This option has no effect unless TYPE= BAR.
CLOSE= numeric-variable
specifies the data for the CLOSE tick on the bar or line. For a vertical plot, the tick value is represented by an indicator on the side of the bar or line that has higher X values. For a horizontal plot, the value is represented by an indicator on the side with higher Y values.
CLUSTERWIDTH= numeric-value
specifies the cluster width as a ratio of the maximum width. Specify a value from 0.0 (narrowest) to 1.0 (widest).
Requirement:This option is applicable only when the X or Y axis is discrete.
Interactions:This option is applicable only when TYPE= BAR.

This option is applicable only when the GROUP option is specified and GROUPDISPLAY= CLUSTER.

DISCRETEOFFSET= numeric-value
specifies an amount to offset all lines or bars from the category midpoints. Specify a value from -0.5 (left offset) to +0.5 (right offset).
Default:0.0 (no offset from the category midpoints)
Requirement:This option is applicable only when the X or Y axis is discrete.
FILL | NOFILL
specifies whether the area fill is visible for bars. The FILL option shows the area fill. The NOFILL option hides the area fill.
Default:The default status of the area fill is specified by the DisplayOpts attribute of the GraphBand style element in the current style.
Interactions:This option has no effect unless TYPE= BAR.

Specifying FILL also hides any visible outlines.

If NOFILL and NOOUTLINE are both specified, then both options are ignored.

FILLATTRS= style-element | (COLOR= color)
specifies the appearance of the area fill for the bar. You can specify the color of the fill by using a style element or by using the COLOR= suboption. You can specify colors using the same color schemes that are supported by SAS/GRAPH software. For more information, see Color-Naming Schemes in SAS/GRAPH: Reference.
Default:For ungrouped data, the default color is specified by the Color attribute of the GraphDataConfidence style element in the current style. For grouped data, the default color is specified by the Color attribute of the GraphData1... GraphDatan style elements in the current style.
Interactions:This option is applicable only when TYPE= BAR.

This option has no effect if you also specify the NOFILL option.

GROUP= variable
specifies a variable that is used to group the data. The plot elements for each group value are automatically distinguished by different visual attributes.
GROUPDISPLAY= OVERLAY | CLUSTER
specifies how to display grouped data.
OVERLAY
groups are overlaid without any clustering. Each group is represented by unique visual attributes derived from the GraphData1... GraphDatan style elements in the current style.
CLUSTER
observations with different group values are displayed in adjacent clusters around the category value. Each set of group values is centered at the midpoint tick mark for the category.
Default:OVERLAY
Restriction:GROUPDISPLAY=CLUSTER has no effect unless the X or Y axis is discrete.
Interactions:GROUPDISPLAY=CLUSTER is applicable only when TYPE=BAR.

This option is ignored unless GROUP= is specified.

GROUPORDER= ASCENDING | DESCENDING | DATA
specifies the ordering of lines or bars within a group.
ASCENDING
displays each group of lines or bars in ascending group value.
DESCENDING
displays each group of lines or bars in descending group value.
DATA
displays each group of lines or bars in data order of the group column.
Interactions:This option is ignored unless GROUP= is specified.

This option is applicable only when GROUPDISPLAY=CLUSTER and TYPE=BAR.

HIGHCAP= character-variable | option | NONE
specifies the type of arrowhead used at the high end of the bar or line. You can specify one of the following options, or you can specify a character variable that contains one of the following options:
SERIF
a small serif. a small serif
The serif is supported for TYPE=LINE only.
BARBEDARROW
a solid triangle with an indent at the base. barbed arrowhead
The barbed arrow is supported for TYPE=LINE only.
FILLEDARROW
a solid triangle.filled arrowhead
The filled arrow is supported for TYPE=BAR and TYPE=LINE.
OPENARROW
resembles the letter "V".Open arrowhead
The open arrow is supported for TYPE=LINE only.
CLOSEDARROW
an outline of a triangle.closed arrowhead
The closed arrow is supported for TYPE=BAR only.
Default:NONE
Restriction:Arrow heads are not displayed for very short bars. Bar height must be at least twice the size of the arrow heads in order for the arrow heads to appear.
HIGHLABEL= variable
specifies the label to be shown at the high end of the line or bar.
INTERVALBARWIDTH= numeric-value
specifies the thickness of the bar when the X (or Y) data is numeric.
Default:The default thickness of the bar is derived from the minimum interval between the data values along X or Y.
Requirement:This option is applicable only when the X or Y axis is a linear or a TIME axis.
Interaction:This option has no effect unless TYPE=BAR.
LABELATTRS= style-element <(options)> | (options)
specifies the appearance of the labels in the plot when you use the HIGHLABEL= option, the LOWLABEL= option, or both options. You can specify the appearance by using a style element or by using suboptions. If you specify a style element, you can also specify suboptions to override specific appearance attributes.
options can be one or more of the following:
COLOR= color
specifies the color of the characters. You can specify colors using the same color schemes that are supported by SAS/GRAPH software. For more information, see Color-Naming Schemes in SAS/GRAPH: Reference.
Default:For ungrouped data, the default color is specified by the Color attribute of the GraphDataText style element in the current style. For grouped data, the default color is specified by the ContrastColor attribute of the GraphData1 ... GraphDatan style elements in the current style.
FAMILY= “font-family
specifies the font family for the marker characters. The SAS ODS styles use TrueType system fonts. For more information, see TrueType Fonts Supplied by SAS in SAS Language Reference: Concepts.
Default:The default font family is specified by the FontFamily attribute of the GraphDataText style element in the current style.
SIZE= n <units>
specifies the font size of the characters. You can also specify the unit of measurement. The default unit is pixels. For a list of measurement units that are supported, see Units of Measurement.
Default:The default font size is specified by the FontSize attribute of the GraphDataText style element in the current style.
STYLE= ITALIC | NORMAL
specifies whether the characters are italic (ITALIC) or normal (NORMAL).
Default:The default font style is specified by the FontStyle attribute of the GraphDataText style element in the current style.
WEIGHT= BOLD | NORMAL
specifies whether the characters are bold (BOLD) or normal (NORMAL).
Default:The default font weight is specified by the FontWeight attribute of the GraphDataText style element in the current style.
LEGENDLABEL= “text-string
specifies a label that identifies the elements from the band plot in the legend. By default, the label “band“ is used for ungrouped data, and the group values are used for grouped data.
Interaction:The LEGENDLABEL= option has no effect if you also specify the GROUP= option.
LINEATTRS= style-element <(options)> | (options)
specifies the appearance of the outlines for the band. You can specify the appearance by using a style element or by using suboptions. If you specify a style element, you can also specify suboptions to override specific appearance attributes.
options can be one or more of the following:
COLOR= color
specifies the color of the line. You can specify colors using the same color schemes that are supported by SAS/GRAPH software. For more information, see Color-Naming Schemes in SAS/GRAPH: Reference.
Default:For ungrouped data, the default color is specified by the ContrastColor attribute of the GraphDataDefault style element in the current style. For grouped data, the default color is specified by the ContrastColor attribute of the GraphData1 ... GraphDatan style elements in the current style.
PATTERN= line-pattern
specifies the line pattern for the line. You can reference SAS patterns by number or by name. For a list of line patterns, see Line Patterns.
Default:For ungrouped data, the default line pattern is specified by the LineStyle attribute of the GraphDataDefault style element in the current style. For grouped data, the default line pattern is specified by the LineStyle attribute of the GraphData1 ... GraphDatan style elements in the current style.
THICKNESS= n <units>
specifies the thickness of the line. You can also specify the unit of measure. The default unit is pixels. For a list of measurement units that are supported, see Units of Measurement.
Default:For ungrouped data, the default line thickness is specified by the LineThickness attribute of the GraphDataDefault style element in the current style. For grouped data, the default line thickness is specified by the LineThickness attribute of the GraphData1 ... GraphDatan style elements in the current style.
Interaction:This option has no effect unless you also specify the OUTLINES option.
LOWCAP= character-variable | option | NONE
specifies the type of arrowhead used at the low end of the bar or line. You can specify one of the following options, or you can specify a character variable that contains one of the following options:
SERIF
a small serif. a small serif
The serif is supported for TYPE=LINE only.
BARBEDARROW
a solid triangle with an indent at the base. barbed arrowhead
The barbed arrow is supported for TYPE=LINE only.
FILLEDARROW
a solid triangle.filled arrowhead
The filled arrow is supported for TYPE=BAR and TYPE=LINE.
OPENARROW
resembles the letter "V".Open arrowhead
The open arrow is supported for TYPE=LINE only.
CLOSEDARROW
an outline of a triangle.closed arrowhead
The closed arrow is supported for TYPE=BAR only.
Default:NONE
Restriction:Arrow heads are not displayed for very short bars. Bar height must be at least twice the size of the arrow heads in order for the arrow heads to appear.
LOWLABEL= variable
specifies the label to be shown at the low end of the line or bar.
NOMISSINGGROUP
specifies that missing values of the group variable are not included in the plot.
Interaction:This option has no effect unless GROUP= is also specified.
NAME= “text-string
specifies a name for the plot. You can use the name to refer to this plot in other statements.
Note:The name is case-sensitive. When you refer to the specified name in other statements, you must use the same exact capitalization.
OPEN= numeric-variable
specifies the data for the OPEN tick on the bar or line.
For a vertical plot, the tick value is represented by an indicator on the side of the bar or line that has lower X values. For a horizontal plot, the value is represented by an indicator on the side with lower Y values.
OUTLINE | NOOUTLINE
specifies whether the outlines of the bars are visible. The OUTLINE option shows the outlines. The NOOUTLINE option hides the outlines.
Default:OUTLINE
Interactions:This option has no effect unless TYPE= BAR.

Specifying OUTLINE also hides the fill color.

If NOOUTLINE and NOFILL are both specified, then both options are ignored.

TRANSPARENCY= value
specifies the degree of transparency for the plot. Specify a value from 0.0 (completely opaque) to 1.0 (completely transparent).
Default:0.0
TYPE= BAR | LINE
specifies how the data is to be represented. BAR uses fill and outline attributes. LINE uses line attributes.
Default:LINE
URL= character-variable
specifies a character variable that contains URLs for Web pages to be displayed when parts of the plot are selected within an HTML page.
Default:By default, no HTML links are created.
Interactions:This option affects graphics output that is created through the ODS HTML destination only. For more information about ODS destinations, see Specifying a Destination.

This option has no effect unless you also specify IMAGEMAP in the ODS GRAPHICS statement. For more information, see Using the ODS GRAPHICS Statement.