Previous Page | Next Page

The GPLOT Procedure

BUBBLE2 Statement


Creates a second vertical axis on the right side of a graph produced by an accompanying BUBBLE or PLOT statement. A second variable can be plotted against this axis.
Requirements: You cannot use the BUBBLE2 statement alone. You can use it only with a BUBBLE or PLOT statement. At least one plot request is required.
Global statements: AXIS, FOOTNOTE, TITLE


Description

The BUBBLE2 statement specifies one or more plot requests that name the horizontal and right vertical axis variables and the variable that controls the size of the bubbles. This statement automatically does the following:

You can use statement options to control right vertical axis scaling, draw reference lines on the right vertical axis, control the display of the bubbles, display a background color or image, and specify annotation.

In addition, you can use global statements to modify the 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.


Syntax

BUBBLE2 plot-request(s) </option(s)>;

option(s) can be one or more options from any or all of the following categories:


Required Arguments

plot-request(s)

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:

y-variable*x-variable=bubble-size

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. All of these variables must be in the input data set:

y-variable

variable plotted on the right vertical axis; typically it is different from y-variable in the accompanying BUBBLE or PLOT statement.

x-variable

variable plotted on the horizontal axis; it is the same as x-variable in the accompanying BUBBLE or PLOT statement.

bubble-size

specifies the size of the bubbles. Bubble-size must be numeric. If the value of bubble-size is positive, bubbles are drawn with a solid line; if it is negative, bubbles are drawn with a dashed line.


Options

Options for the BUBBLE2 statement are identical to the options for the BUBBLE statement with exception of the following, which are ignored if specified:

AUTOHREF

CAUTOHREF=

CHREF=

DESCRIPTION=

HAXIS=

HMINOR=

HREF=

HZERO=

IFRAME=

IMAGESTYLE =

LAUTOHREF=

LHREF=

NAME=

WAUTOHREF=

WHREF=

See BUBBLE Statement for complete descriptions of options used with the BUBBLE2 statement.


Coordinating BUBBLE and BUBBLE2 Plot Requests

The BUBBLE2 statement draws circles only for values that are located within the axes. Bubbles are not drawn for values that lie outside of the axis range. If a bubble size value causes a bubble to overlap the axis, the bubble is clipped against the axis line.

In the BUBBLE2 statement, either the y-variable or bubble-size can differ from the variables in the BUBBLE statement. Here are some possible combinations of plot requests for BUBBLE and BUBBLE2 statement pairs and how they affect the plot:

The plot requests on the BUBBLE and BUBBLE2 statements must be evenly matched, for example:

bubble  y*x=s  b*a=c;
      bubble2 y2*x=s b2*a=c2;

These statements produce two graphs each with two vertical axes. The first pair of plot requests (Y*X=S and Y2*X=S) produce one graph in which the variable X is plotted on the horizontal axis, the variable Y is plotted on the left axis, and the variable Y2 is plotted on the right axis. In this pair, the value of S is the same for both requests. The second pair of plot requests (B*A=C and B2*A=C2) produce another graph in which the variable A is plotted on the horizontal axis, the variable B is plotted on the left axis, and the variable B2 is plotted on the right axis.

Any modifications to horizontal axes specifications must be identical for both statements; if they are different, the BUBBLE2 axis specification is ignored.

If the scale of values for the left and right vertical axes is the same and you want both axes to represent the same range of values, specify the range with a VAXIS= option in both the BUBBLE and BUBBLE2 statements.

Previous Page | Next Page | Top of Page