Sample 25577: Labeling and sizing plot bubbles using PROC GPLOT
This sample is from the "SAS/GRAPH Software: Reference, Version 8", Volume 2, Chapter 21. For additional information on the sample refer to this book.
/*+-------------------------------------------------------------+
| S A S S A M P L E L I B R A R Y |
| |
| NAME: GPLBUBL2 |
| TITLE: GPLBUBL2-Labeling and Sizing Plot Bubbles |
| PRODUCT: GRAPH |
| SYSTEM: ALL |
| KEYS: GRAPHICS GOPTIONS GPLOT AXIS |
| PROCS: GPLOT |
| DATA: INTERNAL |
| |
| SUPPORT: GRAPHICS STAFF UPDATE: |
| REF: SAS/GRAPH REFERENCE GUIDE |
| MISC: THIS IS A BUBBLE PLOT. |
+-------------------------------------------------------------+*/
/* Set the graphics environment */
goptions reset=all gunit=pct border cback=white
colors=(black blue green red)
ftitle=swissb ftext=swiss htitle=6 htext=3;
/* Create the data set JOBS */
data jobs;
length eng $5;
input eng dollars num;
datalines;
Civil 27308 73273
Aero 29844 70192
Elec 22920 89382
Mech 32816 19601
Chem 28116 25541
Petro 18444 34833
;
/* Define titles and footnote */
title1 'Member Profile';
title2 h=4 'Salaries and Number of Member Engineers';
footnote h=3 j=r 'GPLBUBL2';
/* Define axis characteristics */
axis1 label=none
offset=(5,5)
width=3
value=(height=4);
axis2 order=(0 to 40000 by 10000)
label=none
major=(height=1.5)
minor=(height=1)
width=3
value=(height=4);
/* Generate bubble plot */
proc gplot data= jobs;
format dollars dollar9. num comma7.0;
bubble dollars*eng=num / haxis=axis1
vaxis=axis2
vminor=1
bcolor=red
blabel
bfont=swissi
bsize=12
caxis=blue;
run;
quit;

This example shows how BUBBLE statement options control the appearance of bubbles and their labels. It also shows how AXIS statements can modify the plot axes.
| Type: | Sample |
| Topic: | Query and Reporting ==> Creating Reports ==> Graphical ==> Graph Elements ==> Labels Query and Reporting ==> Creating Reports ==> Graphical ==> Graph Types ==> Plots ==> Bubble SAS Reference ==> Procedures ==> GPLOT
|
| Date Modified: | 2005-08-27 03:03:26 |
| Date Created: | 2005-05-23 14:16:41 |
Operating System and Release Information
| SAS System | SAS/GRAPH | All | 8 TS M0 | n/a |