Sample 25576: Generating a simple bubble plot 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: GPLBUBL1 |
| TITLE: GPLBUBL1-Generating a Simple Bubble Plot |
| 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 greeen red)
ftitle=swissb ftext=swiss htitle=6 htext=4;
/* 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 'Salaries and Number of Member Engineers';
footnote h=3 j=r 'GPLBUBL1 ';
/* Define axis characteristics */
axis1 offset=(5,5);
/* Generate bubble plot */
proc gplot data=jobs;
format dollars dollar9.;
bubble dollars*eng=num / haxis=axis1;
run;
quit;

This example shows a bubble plot in which each bubble represents a category of engineer.
| Type: | Sample |
| Topic: | SAS Reference ==> Procedures ==> GPLOT Query and Reporting ==> Creating Reports ==> Graphical ==> Graph Types ==> Plots ==> Bubble
|
| Date Modified: | 2005-07-29 03:02:38 |
| Date Created: | 2005-05-23 14:16:37 |
Operating System and Release Information
| SAS System | SAS/GRAPH | All | 8 TS M0 | n/a |