Sample 39144: Subjects with eye irritation over time by severity and treatment
This sample uses the SGPANEL procedure to create stacked bar charts in one panel to create a grouped chart.
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 SGPANEL procedure to create stacked bar charts in one panel to create a grouped chart.
proc format;
picture abs
low-<0='000'
0<-high='000';
value stime 0='Baseline'
1='Week 1'
2='Week 2'
3='Week 4'
4='Week 6'
5='Week 8'
6='End Point';
value trt 1='Pla'
2='A'
3='B';
value val 0='None'
1='Mild'
2='Moderate'
3='Severe'
4='Very Severe';
run;
data eye;
input time trtgrp value percent;
format time stime.;
format trtgrp trt.;
format value val.;
datalines;
0 1 0 6.67
0 1 1 26.67
0 1 2 57.78
0 1 3 6.67
0 1 4 2.22
0 2 0 21.74
0 2 1 15.94
0 2 2 50.72
0 2 3 8.70
0 2 4 2.90
0 3 0 15.07
0 3 1 21.92
0 3 2 45.21
0 3 3 16.44
0 3 4 1.37
1 1 0 15.56
1 1 1 24.44
1 1 2 42.22
1 1 3 15.56
1 1 4 2.22
1 2 0 26.09
1 2 1 34.78
1 2 2 26.09
1 2 3 13.04
1 3 0 15.07
1 3 1 36.99
1 3 2 35.62
1 3 3 9.59
1 3 4 2.74
2 1 0 15.56
2 1 1 40.00
2 1 2 40.00
2 1 3 4.44
2 2 0 28.36
2 2 1 40.30
2 2 2 22.39
2 2 3 8.96
2 3 0 25.00
2 3 1 27.78
2 3 2 40.28
2 3 3 5.56
2 3 4 1.39
3 1 0 15.91
3 1 1 38.64
3 1 2 25.00
3 1 3 18.18
3 1 4 2.27
3 2 0 29.69
3 2 1 35.94
3 2 2 26.56
3 2 3 7.81
3 3 0 19.72
3 3 1 43.66
3 3 2 33.80
3 3 3 2.82
4 1 0 27.91
4 1 1 44.19
4 1 2 23.26
4 1 3 2.33
4 1 4 2.33
4 2 0 36.07
4 2 1 29.51
4 2 2 29.51
4 2 3 4.92
4 3 0 20.00
4 3 1 44.62
4 3 2 29.23
4 3 3 4.62
4 3 4 1.54
5 1 0 26.19
5 1 1 38.10
5 1 2 28.57
5 1 3 7.14
5 2 0 33.93
5 2 1 41.07
5 2 2 21.43
5 2 3 3.57
5 3 0 28.57
5 3 1 30.16
5 3 2 36.51
5 3 3 4.76
6 1 0 24.44
6 1 1 37.78
6 1 2 28.89
6 1 3 8.89
6 2 0 31.88
6 2 1 37.68
6 2 2 27.54
6 2 3 2.90
6 3 0 30.14
6 3 1 27.40
6 3 2 36.99
6 3 3 4.11
6 3 4 1.37
;
run;
data eye2;
set eye;
if value > 1 then percent=-percent;
run;
proc template;
define style styles.blueeye;
parent = styles.default;
class GraphColors
"Abstract colors used in graph styles" /
'gdata1' = cx8f9fDE
'gdata2' = cx42659C
'gdata3' = cxC8a0a0
'gdata4' = cxa07070
'gdata5' = cxbf282A
'gcdata1' = cx000000
'gcdata2' = cx000000
'gcdata3' = cx000000
'gcdata4' = cx00000C
'gcdata5' = cx000000;
end;
run;
ods listing close;
ods html file='eye.html' path='.' style=styles.blueeye;
ods graphics on / reset imagename='eye' imagefmt=gif width=600px height=400px;
title "Subjects with Eye Irritation Over Time by Severity and Treatment";
proc sgpanel data=eye2;
format percent abs.;
panelby time / layout=columnlattice onepanel noborder colheaderpos=bottom novarname;
vbar trtgrp / response=percent group=value;
colaxis display=(nolabel noticks);
rowaxis label='Percent' values=(-100 to 100 by 20) grid offsetmax=0.025;
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.
This sample uses the SGPANEL procedure to create stacked bar charts in one panel to create a grouped chart.
Type: | Sample |
Topic: | SAS Reference ==> Procedures ==> SGPANEL Query and Reporting ==> Creating Reports ==> Graphical ==> Health and Life Sciences Industry
|
Date Modified: | 2010-04-06 14:12:08 |
Date Created: | 2010-03-23 15:52:52 |
Operating System and Release Information
SAS System | SAS/GRAPH | z/OS | 9.2 TS2M0 | |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.2 TS2M0 | |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.2 TS2M0 | |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.2 TS2M0 | |
Microsoft Windows XP 64-bit Edition | 9.2 TS2M0 | |
Microsoft® Windows® for x64 | 9.2 TS2M0 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.2 TS2M0 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.2 TS2M0 | |
Microsoft Windows Server 2003 Standard Edition | 9.2 TS2M0 | |
Microsoft Windows XP Professional | 9.2 TS2M0 | |
Windows Vista | 9.2 TS2M0 | |
64-bit Enabled AIX | 9.2 TS2M0 | |
64-bit Enabled HP-UX | 9.2 TS2M0 | |
64-bit Enabled Solaris | 9.2 TS2M0 | |
HP-UX IPF | 9.2 TS2M0 | |
Linux | 9.2 TS2M0 | |
Linux for x64 | 9.2 TS2M0 | |
OpenVMS on HP Integrity | 9.2 TS2M0 | |
Solaris for x64 | 9.2 TS2M0 | |