This sample uses the Graph Template Language (GTL) to produce a matrix display of maximum LFT values.
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 safety;
label alat="ALAT (/ULN)";
label biltot="BILTOT (/ULN)";
label alkph="ALKPH (/ULN)";
label asat="ASAT (/ULN)";
input alat biltot alkph asat drugnum @@;
datalines;
1.50402 0.05708 0.33048 0.90276 1 0.52019 0.36690 0.07217 0.49515 1
0.61483 0.17867 0.57084 0.67013 2 0.66292 0.24336 0.25042 1.12487 1
1.08810 1.01795 0.34650 1.34532 2 0.79028 0.68118 0.32665 0.06345 1
0.52570 0.45411 0.28334 0.06357 1 1.01392 0.84606 0.28641 0.90854 2
1.13292 1.66524 0.34141 0.54517 1 0.39109 0.61881 0.76977 1.06455 2
0.29077 0.03953 1.02333 0.12085 2 0.08022 0.61256 0.63748 0.03751 1
0.28869 1.14711 0.85117 0.22888 1 0.68430 0.33865 1.27934 0.64995 1
0.28958 0.24271 0.88497 0.44784 1 0.59950 0.98547 0.82870 0.69982 1
1.14884 0.71048 0.52301 0.10196 1 0.74720 0.29196 0.09289 0.86770 2
0.04359 1.07114 0.51642 1.09350 2 0.79415 1.77495 0.68880 0.14667 1
0.21049 0.49933 0.04290 0.16268 2 0.30420 0.23086 0.80768 1.43123 1
0.82855 0.59293 0.69479 0.23548 1 0.92872 0.65368 0.27917 1.35438 2
0.64265 0.19259 0.39795 0.59636 2 0.19630 0.11172 0.02331 0.88034 1
0.27259 0.25195 0.10293 0.49052 1 0.92556 0.82656 0.78291 0.76708 1
0.64093 0.21803 0.20945 0.06697 2 1.86338 1.24297 0.64196 0.07128 1
0.46230 0.24378 1.29684 0.17389 1 1.34951 0.52357 0.25997 0.19045 2
0.21029 0.07059 0.36651 0.12194 1 0.42935 0.29198 1.39696 0.18104 1
0.62442 0.22078 0.11276 1.18317 1 1.40189 0.21334 0.10007 0.26606 2
0.17403 0.69906 0.11017 2.70367 2 0.10825 0.89657 0.18575 0.09142 2
0.73497 0.16258 0.18796 1.75182 1 0.50389 0.74195 1.00257 1.46249 1
1.59186 1.98800 0.31796 1.84198 1 1.70423 0.14395 0.33161 0.60179 2
1.46257 0.62399 0.25600 0.04913 2 0.96211 0.06294 0.91356 0.53554 1
0.75679 0.33871 0.02618 0.20742 2 0.18174 0.13500 0.27706 0.25103 1
0.16075 0.68592 0.57571 0.20039 2 1.42659 0.53351 1.42545 0.72487 1
1.91639 0.85802 1.26269 0.57197 2 0.79976 0.78239 0.04178 0.14514 2
1.81131 0.90045 0.57011 0.25534 2 1.23186 0.54773 0.37328 0.22021 2
0.66136 0.28402 0.05045 0.79116 1 0.07428 0.32438 0.21398 1.62037 2
0.98986 0.06453 1.14208 1.18013 1 0.68676 0.20856 0.25399 0.55969 2
0.06649 0.43363 0.90560 0.26845 2 0.76531 0.61245 0.73597 0.51179 2
0.33627 0.59912 0.71335 0.23930 2 0.71750 0.01282 1.29445 0.09027 1
0.77638 1.21813 1.52338 1.36050 2 0.19576 0.39795 0.45891 0.41354 2
0.08961 0.30520 0.39586 0.03269 2 0.06612 0.37675 0.05343 1.60441 1
0.62913 0.90338 0.89807 0.03400 1 0.49409 0.07936 0.20737 0.41714 2
0.75204 0.45698 0.58023 0.50012 2 0.27998 0.27589 0.14848 0.07016 1
0.56094 0.69074 0.28121 0.22961 1 0.30435 1.02185 1.27321 0.47303 1
1.10021 0.17047 0.33113 0.30318 2 0.02911 0.26894 0.15328 0.79870 2
1.75579 0.13909 1.18164 0.75928 2 1.40748 0.12699 1.02493 0.50448 2
0.28524 0.47159 1.60690 0.20059 2 0.32504 0.32206 0.16286 0.91272 1
0.35609 0.91710 0.12535 0.13337 2 1.51385 0.65495 1.21880 1.10917 1
0.03512 0.21372 0.51937 0.81195 2 1.16905 0.12493 0.11143 0.77166 2
0.10314 0.56135 0.05451 0.30021 1 2.30313 0.13978 0.63976 0.11976 2
0.26900 0.77324 0.55505 3.81230 2 1.08605 0.31617 0.91117 1.53117 1
1.05603 0.70337 0.49963 0.75516 1 0.29395 0.78740 0.28114 1.07866 1
2.28700 1.70266 0.11234 0.51744 1 0.13196 0.16789 0.64827 0.52155 2
0.03618 0.35690 0.40794 2.02275 1 0.82262 0.03359 0.46697 0.42283 2
1.47206 0.92371 0.05976 0.18233 2 0.46250 0.57460 0.22474 0.48443 1
0.54458 0.28868 1.86455 0.57534 2 0.39313 0.04371 0.57599 0.09348 1
0.07420 0.48951 0.25404 0.41949 1 2.03402 0.23141 1.25288 0.24619 1
0.44685 0.26911 0.31767 1.13628 2 0.13956 0.38036 0.54122 0.14997 1
1.16847 1.66600 3.11100 0.52793 2 0.10580 0.43407 0.80791 0.15014 1
;
run;
proc template;
define style listingSmallFont;
parent = Styles.Listing;
style GraphFonts from GraphFonts
"Fonts used in graph styles" /
'GraphDataFont' = (", ",7pt)
'GraphUnicodeFont' = ("",9pt)
'GraphValueFont' = (", ",8pt)
'GraphLabelFont' = (", ",9pt)
'GraphFootnoteFont' = (", ",8pt)
'GraphTitleFont' = (", ",11pt,bold)
'GraphAnnoFont' = (", ",10pt);
;
end;
run;
data safety;
set safety;
if drugnum=1 then drug="Drug A (N=209)" ;
else if drugnum=2 then drug="Drug B (N=405)" ;
run;
proc template;
define statgraph Safety_Matrix;
begingraph / designwidth=7in designheight=4.5in;
entrytitle 'Matrix Display of Maximum LFT Values';
layout lattice / columns=3 order=rowmajor columndatarange=union rowdatarange=union
columngutter=5 rowgutter=5 pad=(left=80 right=80);
sidebar;
layout overlay;
discretelegend 'scat' / across=2 border=false;
endlayout;
endsidebar;
columnaxes;
columnaxis / linearopts=(thresholdmax=1 viewmax=4);
columnaxis / linearopts=(thresholdmax=1 viewmax=4);
columnaxis / linearopts=(thresholdmax=1 viewmax=4);
endcolumnaxes;
rowaxes;
rowaxis / linearopts=(thresholdmax=1 viewmax=4);
rowaxis / linearopts=(thresholdmax=1 viewmax=4);
rowaxis / linearopts=(thresholdmax=1 viewmax=4);
endrowaxes;
layout overlay / yaxisopts=(linearopts=(thresholdmax=1));
scatterplot x=asat y=alat / group=drug name='scat' markerattrs=(size=9 weight=normal) ;
referenceline x=1 / lineattrs=(pattern=dash);
referenceline x=1.5 / lineattrs=(pattern=dash);
referenceline x=2 / lineattrs=(pattern=dash);
referenceline y=1 / lineattrs=(pattern=dash);
referenceline y=1.5 / lineattrs=(pattern=dash);
referenceline y=2 / lineattrs=(pattern=dash);
endlayout;
layout overlay / yaxisopts=(linearopts=(thresholdmax=1));
endlayout;
layout overlay / yaxisopts=(linearopts=(thresholdmax=1));
endlayout;
layout overlay / yaxisopts=(linearopts=(thresholdmax=1));
scatterplot x=asat y=biltot / group=drug markerattrs=(size=9 weight=normal);
referenceline x=1 / lineattrs=(pattern=dash);
referenceline x=1.5 / lineattrs=(pattern=dash);
referenceline x=2 / lineattrs=(pattern=dash);
referenceline y=1 / lineattrs=(pattern=dash);
referenceline y=1.5 / lineattrs=(pattern=dash);
referenceline y=2 / lineattrs=(pattern=dash);
endlayout;
layout overlay / yaxisopts=(linearopts=(thresholdmax=1));
scatterplot x=alat y=biltot / group=drug markerattrs=(size=9 weight=normal);
referenceline x=1 / lineattrs=(pattern=dash);
referenceline x=1.5 / lineattrs=(pattern=dash);
referenceline x=2 / lineattrs=(pattern=dash);
referenceline y=1 / lineattrs=(pattern=dash);
referenceline y=1.5 / lineattrs=(pattern=dash);
referenceline y=2 / lineattrs=(pattern=dash);
endlayout;
layout overlay / yaxisopts=(linearopts=(thresholdmax=1));
endlayout;
layout overlay / yaxisopts=(linearopts=(thresholdmax=1));
scatterplot x=asat y=alkph / group=drug markerattrs=(size=9 weight=normal);
referenceline x=1 / lineattrs=(pattern=dash);
referenceline x=1.5 / lineattrs=(pattern=dash);
referenceline x=2 / lineattrs=(pattern=dash);
referenceline y=1 / lineattrs=(pattern=dash);
referenceline y=1.5 / lineattrs=(pattern=dash);
referenceline y=2 / lineattrs=(pattern=dash);
endlayout;
layout overlay / yaxisopts=(linearopts=(thresholdmax=1));
scatterplot x=alat y=alkph / group=drug markerattrs=(size=9 weight=normal);
referenceline x=1 / lineattrs=(pattern=dash);
referenceline x=1.5 / lineattrs=(pattern=dash);
referenceline x=2 / lineattrs=(pattern=dash);
referenceline y=1 / lineattrs=(pattern=dash);
referenceline y=1.5 / lineattrs=(pattern=dash);
referenceline y=2 / lineattrs=(pattern=dash);
endlayout;
layout overlay / yaxisopts=(linearopts=(thresholdmax=1));
scatterplot x=biltot y=alkph / group=drug markerattrs=(size=9 weight=normal);
referenceline x=1 / lineattrs=(pattern=dash);
referenceline x=1.5 / lineattrs=(pattern=dash);
referenceline x=2 / lineattrs=(pattern=dash);
referenceline y=1 / lineattrs=(pattern=dash);
referenceline y=1.5 / lineattrs=(pattern=dash);
referenceline y=2 / lineattrs=(pattern=dash);
endlayout;
endlayout;
entryfootnote halign=left "For ALAT, ASAT and ALKPH, the Clinical Concern Level is 2 ULN;" ;
entryfootnote halign=left "For BILTOT, the CCL is 1.5 ULN: where ULN is the Upper Level of Normal Range";
endgraph;
end;
run;
ods listing close;
ods html image_dpi=100 file='safetymatrix.html' path='.';
ods graphics / reset noborder width=600px height=400px
imagename="ClinicalHandout_SafetyMatrix" imagefmt=gif noscale;
proc sgrender data=safety template=Safety_Matrix;
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:12:17 |
Date Created: | 2010-03-19 14:49:49 |
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 |