SGPANEL Procedure

BUBBLE Statement

Creates a bubble plot in which two variables determine the location of the bubble centers and a third variable controls the size of the bubble.
About Bubble Plots

Syntax

BUBBLE X= variable Y= variable SIZE= numeric-variable </ option(s)>;

Summary of Optional Arguments

Bubble options
specifies the size of the radius of the largest bubble.
specifies the size of the radius of the smallest bubble.
specifies whether the bubbles are filled.
specifies the appearance of the fill for the bubbles.
specifies the appearance of the outlines for the bubbles.
specifies whether the outlines of the bubbles are visible.
Group options
specifies that missing values of the group variable are not included in the plot.
Label options
displays a label for each data point.
specifies the appearance of the labels in the plot when you use the DATALABEL= option.
Plot options
specifies the value of the ID variable in an attribute map data set.
specifies a variable that is used to group the data.
specifies the label that identifies the bubble plot in the legend.
specifies a name for the plot.
specifies the degree of transparency for the fill and outline of the bubbles.
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
specifies the variable for the X axis.
Y= variable
specifies the variable for the Y axis.
SIZE= numeric-variable
specifies the variable that controls the size of the bubbles. The minimum and maximum values automatically provide the range that is used to determine bubble sizes. You can control this range manually by using the BRADIUSMAX and BRADIUSMIN options.

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.
BRADIUSMAX= numeric-value
specifies the size of the radius of the largest bubble. 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.
Restriction:The BRADIUSMAX= value must be greater than the BRADIUSMIN= value if one is specified. If BRADIUSMAX is not greater, an error is generated and a message is written to the SAS log.
Note:If you specify the maximum size as a percentage, this is interpreted as a percentage of the graph's height.
BRADIUSMIN= numeric-value
specifies the size of the radius of the smallest bubble. 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.
Restriction:The BRADIUSMIN= value must be smaller than the BRADIUSMAX= value if one is specified. If BRADIUSMIN is not smaller, an error is generated and a message is written to the SAS log.
Note:If you specify the minimum size as a percentage, this is interpreted as a percentage of the graph's height.
DATALABEL <= variable>
displays a label for each data point. If you specify a variable, the values of that variable are used for the data labels. If you do not specify a variable, then the values of the Y variable are used for the data labels.
DATALABELATTRS= style-element <(options)> | (options)
specifies the appearance of the labels in the plot when you use the DATALABEL= option. 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.
Here is an example that specifies a style element: DATALABELATTRS=GraphLabelText
options can be one or more of the following:
COLOR= color
specifies the color of the label 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 label 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 label 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 label 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 label 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.
Here is an example expression:
DATALABELATTRS=(Color=Green Family=Arial Size=8 Style=Italic Weight=Bold)
Default:The default style element is GraphDataText.
Interaction:This option has no effect unless the DATALABEL option is also specified.
FILL | NOFILL
specifies whether the bubbles are filled. The FILL option shows the fill color. The NOFILL option hides the fill color.
Default:FILL
Interactions:Specifying FILL also hides the outlines.

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

FILLATTRS= style-element | (COLOR= color)
specifies the appearance of the fill for the bubbles. 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 GraphDataDefault 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.
Interaction:This option has no effect if you specify the NOFILL option.
GROUP= variable
specifies a variable that is used to group the data. The bubbles for each group value are automatically distinguished by different colors.
When this option is used, the bubble colors are taken from the GraphData1... GraphDatan style elements. If the bubbles are filled, then the COLOR attribute is used for bubble fill and GRAPHOUTLINES is used for the bubble outline. If the bubbles are not filled, then the CONTRASTCOLOR and PATTERN are used for the bubble outlines.
When this option is used and the value is a variable associated with an ATTRID= option, the attribute mapping defined by the associated attribute map is used.
LEGENDLABEL= “text-string
specifies the label that identifies the bubble plot in the legend. By default, the label for the Y variable 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 in the same plot statement.
LINEATTRS= style-element <(options)> | (options)
specifies the appearance of the outlines for the bubbles. 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.
Here is an example that specifies a style element: LINEATTRS=GraphData3
For more information about style elements, see Style Elements for Use with ODS Graphics.
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.
Here is an example expression:
LINEATTRS=(Color= "light green" Pattern= MediumDash Thickness= 4)
Default:For ungrouped data, line attributes are derived from the GraphDataDefault style element. For grouped data, the ContrastColor attribute of the GraphData1... GraphDatan style elements are used.
Interaction:This option has no effect if you also specify the NOOUTLINE option.
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.
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.
OUTLINE | NOOUTLINE
specifies whether the outlines of the bubbles are visible. The OUTLINE option shows the outlines. The NOOUTLINE option hides the outlines.
Default:OUTLINE
Interactions:Specifying OUTLINE also hides the fill color.

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

TRANSPARENCY= numeric-value
specifies the degree of transparency for the fill and outline of the bubbles. Specify a value from 0.0 (completely opaque) to 1.0 (completely transparent).
Default:0.0
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.