This sample uses the Graph Template Language (GTL) to produce series plots for lab values by study week.
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.
data labs;
label sgot="SGOT";
label aph="ALKPHOS";
label visit="Study Week";
input visit $ 1-10 treatment $ sgot aph;
datalines;
SCREENING PLACEBO . 108.943
SCREENING PLACEBO . .
WEEK 2 PLACEBO . 83.740
WEEK 2 PLACEBO 10.2941 .
WEEK 4 PLACEBO . 76.423
WEEK 4 PLACEBO 16.1765 .
WEEK 6 PLACEBO . 86.179
WEEK 6 PLACEBO 17.6471 .
WEEK 8 PLACEBO . 67.480
WEEK 8 PLACEBO 11.7647 .
WEEK 10 PLACEBO . 68.293
WEEK 10 PLACEBO 14.7059 .
WEEK 12 PLACEBO . 73.171
WEEK 12 PLACEBO 13.2353 .
WEEK 14 PLACEBO . 74.797
WEEK 14 PLACEBO 12.5000 .
WEEK 16 PLACEBO . 76.423
WEEK 16 PLACEBO 11.7647 .
SCREENING ACTIVE . 66.667
SCREENING ACTIVE 11.8056 .
WEEK 2 ACTIVE . 57.961
WEEK 2 ACTIVE 17.3077 .
WEEK 4 ACTIVE . 68.873
WEEK 4 ACTIVE 17.9487 .
WEEK 6 ACTIVE . 98.748
WEEK 6 ACTIVE 26.9231 .
WEEK 8 ACTIVE . 98.211
WEEK 8 ACTIVE 25.9615 .
WEEK 10 ACTIVE . 100.179
WEEK 10 ACTIVE 27.2436 .
WEEK 12 ACTIVE . 104.293
WEEK 12 ACTIVE 29.9679 .
WEEK 14 ACTIVE . 115.921
WEEK 14 ACTIVE 26.9231 .
WEEK 16 ACTIVE . 118.605
WEEK 16 ACTIVE 33.3333 .
;
run;
proc template;
define statgraph panel;
begingraph / designwidth=7in designheight=4.5in;
entrytitle "Lab Values by Study Week";
layout gridded / rowgutter=5;
layout datapanel classvars=(treatment) / columnaxisopts=(tickvalueattrs=(size=7))
columns=1 headerlabeldisplay=value;
layout prototype / cycleattrs=true;
seriesplot x=visit y=sgot / primary=true display=(markers)
markerattrs=(size=9px weight=bold)
lineattrs=(thickness=2px) name="series1";
seriesplot x=visit y=aph / yaxis=y2 display=(markers)
markerattrs=(size=9px weight=bold)
lineattrs=(thickness=2px) name="series2";
endlayout;
endlayout;
discretelegend "series1" "series2";
endlayout;
endgraph;
end;
run;
ods listing close;
ods html image_dpi=100 file='labvalues.html' path='.';
ods graphics / reset noborder width=600px height=400px
imagename="ClinicalHandout_LabValues" imagefmt=gif noscale;
proc sgrender data=labs template="panel";
run;
ods html close;
ods listing;
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.
Type: | Sample |
Topic: | SAS Reference ==> Procedures ==> SGRENDER Query and Reporting ==> Creating Reports ==> Graphical ==> Graph Template Language (GTL) Query and Reporting ==> Creating Reports ==> Graphical ==> Health and Life Sciences Industry |
Date Modified: | 2010-04-08 13:03:24 |
Date Created: | 2010-03-19 14:35:53 |
Product Family | Product | Host | SAS Release | |
Starting | Ending | |||
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 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 |