Sample 24919: Symbol size based on the frequency of the observations
/***************************************************************/
/* This program uses PROC FREQ and the ANNOTATE facilty to */
/* create a scatter plot with varying sized symbols based */
/* on the frequency of the observations. You could also */
/* vary the size, color, and shape of the symbols based on the */
/* frequency or some other variable. */
/***************************************************************/
goptions reset=all cback=white border;
data a;
input xvar yvar;
datalines;
1 1
2 3
2 3
2 3
3 5
3 5
4 2
4 2
4 2
4 2
4 2
5 7
5 7
5 7
5 7
5 7
5 7
;
proc freq data=a noprint;
tables xvar*yvar / out=freqdata;
run;
data anno;
retain xsys ysys '2' hsys '3' when 'a' color 'blue' text 'dot' function 'symbol';
set freqdata;
x=xvar; y=yvar;
size=count;
run;
symbol i=none v=none c=white r=10;
title1 h=1.25 'Frequency';
axis1 minor=none;
axis2 minor=none;
proc gplot data=a;
plot yvar * xvar / anno=anno vaxis=axis1 haxis=axis2;
run;
quit;

This program uses PROC FREQ and the ANNOTATE facilty to
create a scatter plot with varying sized symbols based
on the frequency of the observations.
| Type: | Sample |
| Topic: | SAS Reference ==> Procedures ==> GPLOT Query and Reporting ==> Creating Reports ==> Graphical ==> Graph Elements ==> Symbols/Interpolation
|
| Date Modified: | 2005-08-31 03:03:16 |
| Date Created: | 2004-11-11 11:08:00 |
Operating System and Release Information
| SAS System | SAS/GRAPH | All | n/a | n/a |