Click here to see the SAS code.
Click here to see the example.

---------------------------------------------------------------

Rather than using the default binning (levels=5), it is
sometimes useful to do it manually...

data subset; set subset;
pct_change=_2010_change/100;
range=.;
if _2010_change <0 then range=1;
else if _2010_change <5 then range=2;
else if _2010_change <15 then range=3;
else if _2010_change <25 then range=4;
else if _2010_change >=25 then range=5;
run;

And then use a user-defined format to have the numeric bins (1-5)
to show as custom text in the legend:

proc format;
value ranges
1 = "LOSS"
2 = "0-5%"
3 = "5-15%"
4 = "15-25%"
5 = "25%+"
;
run;

And then specify custom colors (rather than taking the defaults)
so that they are more meaningful (for example, in this example,
the negative growth states are a completely different color):

pattern1 v=s c=cxe9cd9e;
pattern2 v=s c=cxa2b8cc;
pattern3 v=s c=cx7794a8;
pattern4 v=s c=cx3b5c7a;
pattern5 v=s c=cx113157;


Back to Samples Index