Bubble Plot Task

About the Bubble Plot Task

The Bubble Plot task explores the relationship between three or more variables. In a bubble plot, two variables determine the location of the bubble centers, and a third variable specifies the size of each bubble.

Example:

To create this example:
  1. In the Tasks section, expand the Graph folder and double-click Bubble Plot. The user interface for the Bubble Plot task opens.
  2. On the Data tab, select the SASHELP.CLASS data set.
  3. Assign columns to these roles:
    Role
    Column Name
    X variable
    Height
    Y variable
    Weight
    Size variable
    Age
  4. To run the task, click Submit SAS Code.
Bubble Plot for SasHelp.Class

Assigning Data to Roles

You can subset the data in the input data set by applying an SQL WHERE clause. In the Where string box, enter your valid SQL syntax. You must enclose character strings in single quotation marks. To view this WHERE clause with the resulting graph, select the Include as footnote check box.
To run the Bubble Plot task, you must assign a column to the X variable, Y variable, and Size variable roles.
Option Name
Description
Roles
X variable
specifies the variable for the X axis.
Y variable
specifies the variable for the Y axis.
Size variable
specifies a numeric variable that controls the size of the bubbles. The minimum and maximum values automatically provide the range that is used to determine bubble size. You can set these values on the Options tab.
Color response variable
specifies the numeric variable that is used to map colors to a gradient legend.
Group variable
specifies the variable that is used to group the data. The bubbles for each group are automatically distinguished by different colors.
Note: If you also assign a variable to the Color response variable role, the group variable is ignored.
Label variable
specifies the values to use as labels for each data point. If you assign a variable to this role, the values of that variable are used for the data labels. If you do not assign a variable to this role, the values of the Y variable are used for the data labels.
URL 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.

Setting Options

Option Name
Description
Title and Footnote
You can specify a custom title and footnote for the output. You can also specify the font size for this text.
Bubble Details
Apply color
specifies the color for the bars when a column is not assigned to the Group variable role.
Minimum radius
specifies the radius of the smallest bubble.
Maximum radius
specifies the radius of the largest bubble.
Transparency
specifies the degree of transparency for the bubbles. The range is 0 (completely opaque) to 1 (completely transparent).
Data skin
specifies a special effect to be used on all filled bubbles.
Color Model
If you assign a variable to the Color response variable role, you can specify three colors to use in the color map.
Bubble Labels
If you assign a variable to the Label variable role, you can determine the label color, the font size for the label text, and the label position.
X Axis and Y Axis
Show grid lines
creates grid lines at each tick on the axis.
Show label
specifies whether to display the label for the response axis. By default, the axis label is the name of the variable. However, you can create a custom label.
Legend Details
Group legend location
specifies whether the group legend is located inside or outside the plot. This option is available when you assign a variable to the Group variable role.
Color legend position
specifies whether the color legend appears to the right or below the plot.
Graph Size
You can specify the width and height of the graph in inches, centimeters, or pixels.