Sample 31509: Creating a Risk Map
/* This sample uses the BAND statement in SAS 9.2 SGPLOT
procedure to create a Risk Map */
/* Create sample data */
data work.bp;
infile datalines;
input dias losys hisys grp $ 13-33 refx refy;
datalines;
75 110 190 Severe Hypertension 75 140
115 110 190 Severe Hypertension 90 140
75 110 180 Moderate Hypertension 90 190
110 110 180 Moderate Hypertension . .
75 110 160 Mild Hypertension . .
100 110 160 Mild Hypertension . .
75 110 140 High/Normal . .
90 110 140 High/Normal . .
75 110 130 Normal . .
85 110 130 Normal . .
75 110 120 Optimal . .
80 110 120 Optimal . .
;
run;
/* Use PROC TEMPLATE to define the gradient colors to be
used for the bands in the graph */
proc template;
define style styles.bp;
parent=styles.listing;
style graphcolors from graphcolors /
'gdata6'=CXFFFFFF
'gdata5'=CXF5D9D8
'gdata4'=CXEBB3B1
'gdata3'=CXE18D8A
'gdata2'=CXD76763
'gdata1'=CXBF1810;
end;
run;
/* Use the STYLE created in PROC TEMPLATE */
ods listing style=bp;
title 'Stages of Hypertension';
/* Use the BAND statement to create the bands
in the plot with an overlaid line from the
SERIES statement */
proc sgplot data=bp;
band x=dias lower=losys upper=hisys /
group=grp name="bp";
series x=refx y=refy / lineattrs=(thickness=2);
xaxis values=(75 to 115 by 5) label='Diastolic Pressure (mmHg)';
yaxis values=(110 to 190 by 10) label='Systolic Pressure (mmHg)';
keylegend "bp" / position=right across=1 title='Stage';
inset "Isolated" "Systolic" "Hypertension" / position=left textattrs=graphlabeltext;
run;

This sample uses the BAND statement in PROC SGPLOT to create a Risk Map.
| Date Modified: | 2008-03-20 10:38:52 |
| Date Created: | 2008-03-18 10:29:14 |
Operating System and Release Information
| SAS System | SAS/GRAPH | z/OS | 9.2 TS1M0 | |
| Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.2 TS1M0 | |
| Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.2 TS1M0 | |
| Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.2 TS1M0 | |
| Microsoft Windows XP 64-bit Edition | 9.2 TS1M0 | |
| Microsoft® Windows® for x64 | 9.2 TS1M0 | |
| Microsoft Windows 2000 Advanced Server | 9.2 TS1M0 | |
| Microsoft Windows 2000 Datacenter Server | 9.2 TS1M0 | |
| Microsoft Windows 2000 Server | 9.2 TS1M0 | |
| Microsoft Windows 2000 Professional | 9.2 TS1M0 | |
| Microsoft Windows Server 2003 Datacenter Edition | 9.2 TS1M0 | |
| Microsoft Windows Server 2003 Enterprise Edition | 9.2 TS1M0 | |
| Microsoft Windows Server 2003 Standard Edition | 9.2 TS1M0 | |
| Microsoft Windows XP Professional | 9.2 TS1M0 | |
| Windows Vista | 9.2 TS1M0 | |
| 64-bit Enabled AIX | 9.2 TS1M0 | |
| 64-bit Enabled HP-UX | 9.2 TS1M0 | |
| 64-bit Enabled Solaris | 9.2 TS1M0 | |
| HP-UX IPF | 9.2 TS1M0 | |
| Linux | 9.2 TS1M0 | |
| Linux for x64 | 9.2 TS1M0 | |
| OpenVMS on HP Integrity | 9.2 TS1M0 | |
| Solaris for x64 | 9.2 TS1M0 | |