The GPLOT Procedure |
Requirements: | At least one plot request is required. |
Global statements: | AXIS, FOOTNOTE, TITLE |
The BUBBLE statement specifies one or more plot requests that name the horizontal and left vertical axis variables and the variable that controls the size of the bubbles. This statement automatically does the following:
centers each circle at a data point that is determined by the values of the vertical and horizontal axes variables
scales the axes to include the maximum and minimum data values
labels each axis with the name of its variable or associated label
You can use statement options to control axis scaling, draw reference lines, modify the appearance of axes, control the display of the bubbles, specify a backplane color or image, and specify annotation.
In addition, you can use global statements to modify axes (AXIS statement), and add text to the graph (TITLE, NOTE, and FOOTNOTE statements). You can also use the Annotate data set to enhance the plot.
BUBBLE plot-request(s) </option(s)>; |
option(s) can be one or more options from any or all of the following categories:
BFILL=SOLID | GRADIENT | |
FRONTREF | |
CHREF=reference-line-color | (reference-line-color) | reference-line-color-list | |
LHREF=reference-line-type | (reference-line-type) | reference-line-type-list |
CVREF=reference-line-color | (reference-line-color) | reference-line-color-list | |
LVREF=reference-line-type | (reference-line-type) | reference-line-type-list | |
WAUTOHREF= | |
WHREF= |
catalog entry description options:
Required Arguments |
each specifies the variables to plot and produces a separate graph. All variables must be in the input data set. Multiple plot requests are separated with blanks. A plot request must have this form:
plots the values of two variables and draws a circle (bubble) at each data point. The value of the third variable determines the size of the bubble.
Note: If you specify the JAVA, JAVAMETA, JAVAIMG, ACTIVEX, or ACTXIMG device drivers, then either the x-variable or the y-variable must be numeric.
If you specify the x-variable as a character and the y-variable as numeric, SAS/GRAPH converts the x-axis to display the character values and the y-axis to display the numeric values.
Options |
Options in a BUBBLE statement affect all graphs that are produced by that statement. You can specify as many options as you want and list them in any order.
specifies a data set to annotate plots that are produced by the BUBBLE statement.
Alias: | ANNO= |
See also: | Using Annotate Data Sets |
draws reference lines at all major tick marks on the horizontal axis. LAUTOHREF=, CAUTOHREF=, and WAUTOHREF= options can be used to change the line types, colors, and widths of these reference lines. To specify labels for these reference lines, use the HAXIS= option.
draws reference lines at all major tick marks on the vertical axis. LAUTOVREF=, CAUTOVREF=, and WAUTOVREF= options can be used to change the line types, colors, and widths of these reference lines. To specify labels for these reference lines, use the VAXIS= option.
specifies the color for the bubbles. If you do not specify the BCOLOR= option, then the bubble color becomes the color of the default style (GSTYLE) or the color specified by the current ODS style (if used).
Featured in: | Labeling and Sizing Plot Bubbles and Adding a Right Vertical Axis. |
Style reference: | ContrastColor attribute of the GraphOutline, GraphData1, and TwoColorAltRamp elements. |
enables you to generate solid or gradient-filled bubbles. By default, the JAVA and ActiveX devices create solid bubbles.
BFILL=SOLID fills the bubbles with the color specified by the BCOLOR= option. If the BFILL option is not specified, then the color is specified by the current style. If you are using specific ODS style, the color comes from the contrast color attribute within the GraphData1 style element. | |
BFILL=GRADIENT starts with the current background color and gradually transitions to the color specified with the BCOLOR= option or the color of the current style. If you are using an ODS style, the colors are controlled by the startcolor and endcolor attributes of the TwoColorAltRamp style element. |
Note: The SAS/GRAPH ActiveX control displays negative values as empty circles.
Restriction: | Not supported by Java and ActiveX |
specifies the font to use for bubble labels. See Specifying Fonts in SAS/GRAPH Programs for details on how to specify font. If you omit the BFONT= option, a font specification is searched for in this order:
the font specified by the current style
Featured in: | Labeling and Sizing Plot Bubbles. |
Style reference: | Font attribute of the GraphValueText element |
Restriction: | Not supported by Java and ActiveX |
See also: | The BLABEL option for information on the location and color of labels |
labels the bubbles with the values of the third variable. If the variable has a format, the formatted value is used. By default, bubbles are not labeled.
The procedure normally places labels directly outside of the circle at 315 degrees rotation. If a label in this position does not fit in the axis area, other 45-degree placements (that is, 45, 135, and 225 degrees) are attempted. If the label cannot be placed at any of the positions (45, 135, 225, or 315 degrees) without being clipped, the label is omitted. However, labels can collide with other bubbles or previously placed labels.
Labels display in the color specified by the CTEXT= option. If you omit the CTEXT=option, the default is the color of the current style.
Featured in: | Labeling and Sizing Plot Bubbles |
specifies whether the bubble-scaling proportion is based on the area of the circles or the radius measure. By default, BSCALE=AREA.
The value that is assigned to the BSCALE= option affects how large the bubbles appear in relation to each other. For example, suppose the third variable value is twice as big for one bubble as it is for another. If BSCALE=AREA, the area of the larger bubble is twice the area of the smaller bubble. If BSCALE=RADIUS, the radius of the larger bubble is twice the radius of the smaller bubble and the larger bubble has more than twice the area of the smaller bubble.
Restriction: | Not supported by Java and ActiveX |
specifies an overall scaling factor for the bubbles so that you can increase or decrease the size of all bubbles by this factor. By default, BSIZE=5. If you specify BSIZE=0, then the default size is used instead.
In Web output, the Java applets and the ActiveX Control override the default value. To prevent this override, specify a value for the BSIZE= option, rather than relying on the default value.
Featured in: | Labeling and Sizing Plot Bubbles |
Restriction: | Partially supported by Java and ActiveX |
specifies colors for reference lines drawn at major tick marks on the horizontal axis, as specified by the AUTOHREF option. The default color is either the value of the CAXIS= option or the first color in the color list.
Style reference: | Color attribute of the GraphGridLines element |
specifies the color of reference lines drawn at major tick marks on the vertical axis, as determined by the AUTOVREF option. If you do not specify the CAUTOREF option, the default color is the value of the CAXIS= option. If neither option is specified, the default color is retrieved from the current style or from the device's color list if the NOGSTYLE option is specified.
Style reference: | Color attribute of the GraphGridLines element. |
specifies the color for the axis line and all major and minor tick marks. By default, the procedure uses the color of the current style.
The CAXIS= option is overridden by the COLOR= option in an AXIS definition. The COLOR= option in an AXIS definition is overridden by the COLOR= suboption of the MAJOR= and MINOR= options in an AXIS definition.
Alias: | CA= |
Style reference: | Color attribute of the GraphAxisLines attribute |
fills the axis area with the specified color. If the FRAME option is also in effect, the procedure determines the color of the frame according to the precedence list given for the FRAME option description. If the IFRAME= option is in effect, the specified image fills the axis area instead of the specified color.
Style reference: | Color attribute of the GraphWalls element |
specifies the color of reference lines drawn perpendicular to the horizontal axis. This option affects reference lines drawn with the AUTOHREF, HREF, and GRID options. Specifying a single color without parentheses applies that color to all reference lines. The CAUTOHREF= option overrides the CHREF= option for lines drawn with the AUTOHREF option. Specifying a single color in parentheses applies that color only to the first reference line drawn with the HREF= option. Specifying a color list applies colors sequentially to successive reference lines drawn with the HREF= option. The syntax of the color list is of the form (color1 color2... colorN). If you do not specify the CHREF= option, the GPLOT procedure uses the color specified by the CAXIS= option. If neither option is specified, the default color is retrieved from the current style or from the first color in the color list if the NOGSTYLE option is specified.
Alias: | CH= |
Style reference: | Color attribute of the GraphReference element |
specifies the color for all text on the axes, including tick mark values, axis labels, and bubble labels.
The GPLOT procedure searches for a color specification in this order:
colors specified for labels and values on assigned AXIS and LEGEND statements, which override the CTEXT= option specified in the PLOT statement.
the color specified by the CTEXT= option in the PLOT statement.
the color specified by the CTEXT= option in the GOPTIONS statement.
the color specified in the current style, or, if the NOGSTYLE option is specified, then the default color is black for the Java and ActiveX devices and the first color in the color list for all other devices.
The COLOR= suboption of a LABEL= option in an AXIS definition overrides the CTEXT= option and determines the color of the axis label. Likewise, the COLOR= suboption of a VALUE= option in an AXIS definition overrides the CTEXT= option and determines the color of the tick marks.
or VALUE= option in an AXIS definition, then that COLOR= suboption determines the color of the axis label or the color of the tick mark values, respectively.
Alias: | C= |
Style reference: | Color attributes of the GraphValueText and the GraphLabelText elements |
specifies the color of reference lines drawn perpendicular to the vertical axis. This option affects reference lines drawn with the AUTOVREF, VREF, and GRID options. Specifying a single color without parentheses applies that color to all reference lines. The CAUTOVREF= option overrides the CVREF= option for lines drawn with the AUTOVREF option. Specifying a single color in parentheses applies that color only to the first reference line drawn with the VREF= option. Specifying a color list applies colors sequentially to successive reference lines drawn with the VREF= option. The syntax of the color list is of the form (color1 color2... colorN). If you do not specify the CVREF= option, the GPLOT procedure uses the color specified by the CAXIS= option. If neither option is specified, the default color is retrieved from the current style or from the first color in the color list if the NOGSTYLE option is specified.
Alias: | CV= |
Style reference: | Color attribute of the GraphGridLines element. |
plots character of midpoint-type data in data order instead of the default alphabetical order.
Restriction: | Supported by Java and ActiveX only |
specifies the description of the catalog entry for the plot. The maximum length for entry-description is 256 characters. The description does not appear on the plot. By default, the procedure assigns a description of the form BUBBLE OF variable*variable=variable.
The entry-description can include the #BYLINE, #BYVAL, and #BYVAR substitution options, which work as they do when used on TITLE, FOOTNOTE, and NOTE statements. For more information, refer to the discussion of Substituting BY Line Values in a Text String. The 256-character limit applies before the substitution takes place for these options; thus, if in the SAS program the entry-description text exceeds 256 characters, it is truncated to 256 characters, and then the substitution is performed.
The descriptive text is shown in each of the following locations:
among the catalog-entry properties that you can view from the Explorer window
the data tip text for Web output (depending on the device driver you are using). See Data Tips for Web Presentations for details.
Alias: | DES= |
specifies whether a frame is drawn around the axis area. The default is FRAME. If you also use a BUBBLE2 or PLOT2 statement and your plotting statements have conflicting frame specifications, FRAME is used.
For the frame color, a specification is searched for in this order:
the COLOR= option in the AXIS definition assigned to the vertical axis
the COLOR= option in the AXIS definition assigned to the horizontal axis
the default, which is the color defined by the current style.
To fill the axis area with a background color, use the CFRAME= option.
To fill the axis area with a background image, use the IFRAME= option.
specifies the color of error bars in bar charts. The default is the color of the response axis, which is controlled by the CAXIS= option.
Alias: | FR|NOFR= |
specifies that reference lines drawn by the AUTOREF or REF= options should be drawn in front of the bars. By default, reference lines are drawn on the back plane of the axis.
draws reference lines at all major tick marks on both axes. You get the same result when you use all of these options in a BUBBLE statement: AUTOHREF, AUTOVREF, FRAME, LVREF=34, and LHREF=34. The line type for GRID is 34.
specifies major tick mark values for the horizontal axis or assigns an axis definition. For a description of value-list, see the HAXIS= option for the PLOT statement. To assign labels to horizontal reference lines, specify an axis definition that contains the REFLABEL= option. Labels are applied in sequence to all reference lines drawn with the AUTOHREF and HREF= options.
If you assign an axis definition that does not currently exist, the option is ignored. By default, the procedure scales the axis and provides an appropriate number of tick marks.
If data values fall outside of the range that is specified by the HAXIS= option, then by default the outlying data values are not used in interpolation calculations.
For Web output that is generated with a Java or ActiveX device driver, certain options of the AXIS statement are not supported. For details, see AXIS Statement.
Featured in: | Labeling and Sizing Plot Bubbles |
Restriction: | Partially supported by Java and ActiveX |
See also: | About the Input Data Set for more information on values out of range |
specifies the number of minor tick marks that are drawn between each major tick mark on the horizontal axis. Minor tick marks are not labeled. The HMINOR= option overrides the NUMBER= suboption of the MINOR= option in an AXIS definition. You must specify a positive number.
Alias: | HM= |
Featured in: | Labeling and Sizing Plot Bubbles |
draws one or more reference lines perpendicular to the horizontal axis at points that are specified by value-list. For a description of value-list HAXIS= option for the PLOT statement. LHREF=, CHREF=, and WHREF= options can be used to change the line types, colors, and widths of these reference lines. To specify labels for these reference lines, use the HAXIS= option.
specifies that the order of the values on the horizontal axis be reversed. For Web output that is generated with a Java device driver, the horizontal axis data must be numeric.
Restriction: | Partially supported by Java and ActiveX |
specifies that tick marks on the horizontal axis begin in the first position with a value of zero. The HZERO request is ignored if negative values are present for the horizontal variable or if the horizontal axis has been specified with the HAXIS= option.
identifies the image file you want to apply to the backplane of the plot. See also the IMAGESTYLE= option and Displaying Images on Data Elements. The IFRAME= option is overridden by the NOIMAGEPRINT goption. For more information about the NOIMAGEPRINT option, see IMAGEPRINT.
Restriction: | Not supported by Java |
specifies whether to tile multiple instances of the image to fill the backplane (TILE) or to stretch the image to fit the backplane frame (FIT). The TILE value is the default. For more information see the IFRAME= option.
specifies the line type for reference lines at major tick marks on the horizontal axis, as specified by the AUTOHREF option. Line types are specified as whole numbers from 1 to 46, with 1 representing a solid line and the other values representing dashed lines. The default line type is retrieved from the current style, or if the NOGSTYLE option is specified, the default value is 1, which draws a solid line.
Style reference: | LineStyle attribute of the GraphGridLines element |
specifies a line type for reference lines drawn at major tick marks on the vertical axis, as specified by the AUTOVREF option. The reference-line-type value can be a whole number from 1 to 46. A value of 1 specifies a solid line; values 2 through 46 specify dashed lines. The default line type is retrieved from the current style, or if the NOGSTYLE option is specified, the default value is 1, which draws a solid line.
Style reference: | LineStyle attribute of the GraphGridLines element |
specifies line types for reference lines drawn perpendicular to the horizontal axis. The reference-line-type value can be a whole number from 1 to 46. A value of 1 specifies a solid line; values 2 through 46 specify dashed lines. This option affects reference lines drawn with the AUTOHREF, HREF, and GRID options. Specifying a single line type without parentheses applies that line type to all reference lines. The LAUTOHREF= option overrides the LHREF= option for lines drawn with the AUTOHREF option. Specifying a single line type in parentheses applies that line type only to the first reference line drawn with the HREF= option. Specifying a line-type list applies line types in sequence to successive reference lines drawn with the HREF= option. The syntax of the line type list is of the form (type1 type2... typeN). The default line type is retrieved from the current style, or if the NOGSTYLE option is specified, the default value is 1, which draws a solid line.
Alias: | LH= |
Style reference: | LineStyle attribute of the GraphGridLines element |
specifies line types for reference lines drawn perpendicular to the vertical axis. The reference-line-type value can be a whole number from 1 to 46. A value of 1 specifies a solid line; values 2 through 46 specify dashed lines. This option affects reference lines drawn with the AUTOVREF, VREF, and GRID options. Specifying a single line type without parentheses applies that line type to all reference lines. The LAUTOVREF= option overrides the LVREF= option for lines drawn with the AUTOVREF option. Specifying a single line type in parentheses applies that line type only to the first line drawn by the VREF= option. Specifying a line-type list applies line types in sequence to successive reference lines drawn with the VREF= option. The syntax of the line type list is of the form (type1 type2... typeN). The default line type is retrieved from the current style, or if the NOGSTYLE option is specified, the default value is 1, which draws a solid line. To specify colors for these references lines, use the CVREF= option. To specify labels for these reference lines, use the VAXIS= option.
Alias: | LV= |
Style reference: | LineStyle attribute of the GraphGridLines element |
specifies the name of the GRSEG catalog entry and the name of the graphics output file, if one is created. The name can be up to 256 characters long, but the GRSEG name is truncated to eight characters. Uppercase characters are converted to lowercase, and periods are converted to underscores. The default name is GPLOT. If the name duplicates an existing name, then SAS/GRAPH adds a number to the name to create a unique name-for example, GPLOT1.
See also: | About Filename Indexing |
suppresses the axes, including axis lines, axis labels, all major and minor tick marks, and tick mark values.
Alias: | NOAXES |
specifies the major tick mark values for the vertical axis or assigns an axis definition. For a description of the value-list, see the HAXIS= option. To assign labels to reference lines, specify an axis definition that contains the REFLABEL= option. The labels are applied in sequence to all reference lines defined with the AUTOVREF and VREF= options.
For Web output that is generated with a Java or ActiveX device driver, certain options of the AXIS statement are not supported. For details, see AXIS Statement.
Featured in: | Labeling and Sizing Plot Bubbles and Adding a Right Vertical Axis |
Restriction: | Partially supported by Java and ActiveX |
specifies the number of minor tick marks that are drawn between each major tick mark on the vertical axis. Minor tick marks are not labeled. The VMINOR= option overrides the NUMBER= suboption of the MINOR= option in an AXIS definition. You must specify a positive number.
Alias: | VM= |
Featured in: | Labeling and Sizing Plot Bubbles |
draws one or more reference lines perpendicular to the vertical axis at points that are specified by value-list. For a description of the value-list, see the HAXIS= option. LVREF=, CVREF=, and WVREF= options can be used to change the line types, colors, and widths of these reference lines. To specify labels for these reference lines, use the VAXIS= option.
specifies that the order of the values on the vertical axis should be reversed.
specifies that tick marks on the vertical axis begin in the first position with a zero. The VZERO request is ignored if the vertical variable either contains negative values or has been ordered with the VAXIS= option or the ORDER= option in an AXIS statement.
specifies the line width for all reference lines at major tick marks on the horizontal axis as determined by the AUTOHREF option. Line widths are specified as whole numbers with the default value being 1. To specify a color for these reference lines, use the CAUTOREF= option.
Style reference: | LineThickness attribute of the GraphGridLines element |
specifies the line width for all reference lines at major tick marks on the vertical axis as determined by the AUTOVREF option. Line widths are specified as whole numbers with the default value being 1. To specify a color for these reference lines, use the CAUTOREF= option.
Style reference: | LineThickness attribute of the GraphGridLines element |
specifies line widths for reference lines as determined by the horizontal axis. Line widths are specified as whole numbers. To specify colors for these reference lines, use the CREF= option.
Style reference: | LineThickness attribute of the GraphGridLines element |
specifies line widths for reference lines as determined by the vertical axis. Line widths are specified as whole numbers. To specify colors for these reference lines, use the CREF= option.
Style reference: | LineThickness attribute of the GraphGridLines element |
Controlling the Display of Bubbles |
The BUBBLE statement draws circles only for values that are located within the axes. Observations with values that lie outside of the axis area are not plotted. If a bubble size value causes a bubble to overlap the axis, the bubble is clipped against the axis line. The bubbles for the highest axis value and lowest axis value might be clipped unless you modify the axes in either of the following ways:
Specify the range of values on an axis with the HAXIS= or VAXIS= option, or with AXIS definitions.
To add a right vertical axis, use a BUBBLE2 statement.
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.