Chapter Contents

Previous

Next
The GPLOT Procedure

Example 1: Generating a Simple Bubble Plot


Procedure features:
BUBBLE statement option:
HAXIS=
Other features:
AXIS statement
FORMAT statement
Sample library member: GR21N01

[IMAGE]

This example shows a bubble plot in which each bubble represents a category of engineer. The plot shows engineers on the horizontal axis and average salaries on the vertical axis. Each bubble's vertical location is determined by the average salary for the category. Each bubble's size is determined by the number of engineers in the category: the more engineers, the larger the bubble.
 Note about code
libname reflib 'SAS-data-library';
goptions reset=global gunit=pct border cback=white
         colors=(black blue green red)
         ftitle=swissb ftext=swiss htitle=6 htext=4;
 Note about code
data reflib.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
;
 Note about code
title1 'Member Profile';
title2 'Salaries and Number of Member Engineers';
footnote h=3 j=r 'GR21N01 ';
 Note about code
axis1 offset=(5,5);
 Note about code
proc gplot data=reflib.jobs;
   format dollars dollar9.;
   bubble dollars*eng=num / haxis=axis1;
run;
quit;


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.