Sample 31509: Create a risk map
This sample uses the BAND statement in PROC SGPLOT to create a risk map.
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
This sample uses the BAND statement in PROC SGPLOT 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;
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
This sample uses the BAND statement in PROC SGPLOT to create a risk map.
Type: | Sample |
Topic: | SAS Reference ==> Procedures ==> SGPLOT
|
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 | |