FOCUS AREAS

Graphics

WBC and Differential: Weeks 1-6
Base SAS: ODS Graphics Procedure: SGPANEL

%let gpath='.';
%let dpi=100;

ods listing style=htmlblue image_dpi=&dpi gpath=&gpath; 
ods html close;

proc format;
value visitnum
   1='PreRx'
   2='Week 1'
   3='Week 2'
   4='Week 3'
   5='Week 5'
   6='Week 6';
value labname
   1="WBC x 10(*ESC*){Unicode '00b3'x} / (*ESC*){Unicode mu}L"
   2='Neutrophils %'
run;

/*--Generate Labs data--*/
data labs;
  format visitnum visitnum.;
  do visitnum=1 to 6;
    line=1;
	a=0.6+0.4*ranuni(2);
    do i=1 to 100;
	  result=a*10*ranuni(2)+2.5;
	  output;
	end;
    line=2;
	a=0.6+0.4*ranuni(2);
    do i=1 to 100;
	  result=a*40*ranuni(2)+40;
	  output;
	end;
  end;
run;

proc sort data=labs;
  by line visitnum;
  run;

/*--Add CCL limits--*/
data labs2;
  format numlow best8. numhi best8.;
  format  label labname.;
  set labs;
  by line;
  if first.line or last.line then do;  
    if line=1 then do; numlow=   3.8;  numhi=  10.7; end;
    if line=2 then do; numlow = 40.5;  numhi = 75.0; end;
  end;

  if first.line then label=line;
run;

/*--Panel with Class labels--*/
ods graphics / reset width=5in height=3in imagename='6L_WBC_Panel_Band_Box_NoHeader';
title 'WBC and Differential: Weeks 1-6';
proc sgpanel data=labs2 noautolegend;
  panelby line /onepanel uniscale=column layout=rowlattice noheader;
  band x=visitnum lower=numlow upper=numhi / transparency=0.8 
       fillattrs=(color=yellow) legendlabel='Limits';
  refline numlow / label noclip lineattrs=(thickness=0) labelattrs=(size=7);
  refline numhi / label noclip  lineattrs=(thickness=0) labelattrs=(size=7);
  scatter x=visitnum y=result / transparency=0.9 jitter;
  vbox result / category=visitnum nofill nooutliers;
  inset label / position=topleft nolabel textattrs=(size=9);
  rowaxis display=(nolabel) offsetmax=0.15 valueattrs=(size=7) grid;
  colaxis display=(nolabel)  valueattrs=(size=7);
run;

title;