Sample 24911: Generate bubble labels with PROC GPLOT
This sample uses PROC GPLOT to label bubbles on a bubble plot. A PLOT2 statement along with the POINTLABEL option on a SYMBOL statement is used to label the bubbles.
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
This sample uses PROC GPLOT to label bubbles on a bubble plot. A PLOT2 statement along with the POINTLABEL option on a SYMBOL statement is used to label the bubbles.
The graphics output in the Results tab was produced using SASĀ® 9.2. Submitting
the sample code with releases of SAS prior to SAS 9.2 might produce different results.
/* Set the graphics environment */
goptions reset=all cback=white border htitle=12pt htext=10pt;
/* Create a sample data set */
data one;
input X Y Z Name $8.;
datalines;
.2 .3 3 Fred
.4 .7 4 Wilma
.6 .4 3 Barney
.8 .6 4 Betty
;
run;
/* Customize the horizontal axis */
axis1 offset=(5,5)pct order=(0 to 1 by .1)
minor=none;
/* Customize the left vertical axis */
axis2 offset=(5,5)pct order=(0 to 1 by .1)
minor=none;
/* Customize the right vertical axis */
axis3 offset=(5,5)pct order=(0 to 1 by .1)
minor=none;
/* Specify a SYMBOL statement with the POINTLABEL option */
symbol1 v=none i=none c=black
pointlabel=(h=1.5 f='Albany AMT/bold' "#name");
/* Specify TITLE statement */
title1 'Label bubbles with PROC GPLOT';
/* Create the bubble plot */
proc gplot;
bubble y*x=z / haxis=axis1 vaxis=axis2 bsize=15
bcolor=libg;
plot2 y*x / vaxis=axis3 noaxis;
run;
quit;
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.

This sample uses PROC GPLOT to label bubbles on a bubble plot.
| Type: | Sample |
| Topic: | SAS Reference ==> Procedures ==> GPLOT Query and Reporting ==> Creating Reports ==> Graphical ==> Graph Types ==> Plots ==> Bubble
|
| Date Modified: | 2005-08-31 03:03:12 |
| Date Created: | 2004-11-11 11:07:59 |
Operating System and Release Information
| SAS System | SAS/GRAPH | All | 8 TS M0 | n/a |