Sample 24910: Maintain bubble size across by values
/* Set graphics environment */
goptions reset=all border;
/* Create input data set, A */
data a;
input byvar xvar yvar sizevar;
datalines;
1 10 10 1
1 20 20 2
1 30 30 3
1 40 40 4
2 50 50 1
2 60 60 2
2 70 70 3
2 80 80 4
2 90 90 5
2 100 100 6
2 110 110 7
2 120 120 8
;
/* Create Annotate data set, Anno */
/* HSYS='1' specifies annotate to use a */
/* SIZE unit of percent of plot area. */
data anno;
length function text $8;
retain xsys ysys '2' hsys '1' when 'a' color 'blue' text 'circle' function 'symbol';
set a;
by byvar;
function='symbol';
x=xvar; y=yvar;
size=sizevar; text='circle'; output;
function='label'; position='1'; text=put(sizevar,3.); size=3; output;
run;
/* Create symbol definition */
symbol i=none v=none c=white r=10;
/* Create axes definitions */
axis1 minor=none offset=(2,2);
axis2 minor=none offset=(3,3);
/* Create titles */
title1 h=1.25 f=swissb 'Maintain Bubble Size';
title2 h=1.25 f=swissb 'Across By Values';
/* Produce the plot */
proc gplot data=a;
by byvar;
plot yvar * xvar / anno=anno vaxis=axis1 haxis=axis2;
run;
quit;

Annotate is used to control the size of the bubbles across by values.
| Type: | Sample |
| Topic: | SAS Reference ==> Procedures ==> GPLOT Query and Reporting ==> Creating Reports ==> Graphical ==> Graph Types ==> Plots ==> Bubble
|
| Date Modified: | 2005-08-31 03:03:11 |
| Date Created: | 2004-11-11 11:07:59 |
Operating System and Release Information
| SAS System | SAS/GRAPH | All | n/a | n/a |