%let gpath='.';
ods html close;
%let dpi=200;
ods listing gpath=&gpath image_dpi=&dpi;
/*--VBox--*/
ods listing image_dpi=200;
ods graphics / reset width=2in height=3in imagename='VBox';
title 'Distribution of Cholesterol';
proc sgplot data=sashelp.heart;
vbox cholesterol;
run;
title;
/*--VBox by Category--*/
ods listing image_dpi=200;
ods graphics / reset width=4in height=3in imagename='VBoxByCat';
title 'Distribution of Cholesterol by Death Cause';
proc sgplot data=sashelp.heart;
vbox cholesterol / category=deathcause;
xaxis display=(nolabel);
run;
title;
/*--VBox by Category Connect--*/
ods listing image_dpi=200;
ods graphics / reset width=4in height=3in imagename='VBoxByCatConnect';
title 'Distribution of Cholesterol by Death Cause';
proc sgplot data=sashelp.heart noborder;
vbox cholesterol / category=deathcause connect=mean
fillattrs=graphdata3 dataskin=gloss;
xaxis display=(nolabel);
xaxis display=(noline nolabel noticks);
yaxis display=(noline noticks nolabel) grid;
run;
title;
/*--VBox by Category and Group--*/
proc sort data=sashelp.heart out=heart;;
by descending sex;
run;
/*--VBox by Category and Group--*/
ods listing image_dpi=200;
ods graphics / reset width=4in height=3in imagename='VBoxByCatGroup';
title 'Distribution of Cholesterol by Death Cause';
proc sgplot data=heart noborder;
vbox cholesterol / category=deathcause group=sex
clusterwidth=0.5 boxwidth=0.8
meanattrs=(size=5) outlierattrs=(size=5);
xaxis display=(noline nolabel noticks);
yaxis display=(noline noticks nolabel) grid;
run;
title;
/*--VBox by Category Notches--*/
ods listing image_dpi=200;
ods graphics / reset width=4in height=3in imagename='VBoxByCatNotch';
title 'Distribution of Cholesterol by Death Cause';
proc sgplot data=sashelp.heart noborder;
vbox cholesterol / category=deathcause notches
boxwidth=0.2 meanattrs=(size=6) capshape=none ;
xaxis display=(noline nolabel noticks);
yaxis display=(noline noticks nolabel) grid;
run;
title;
/*--VBox by Category Whisker Percentile--*/
ods listing image_dpi=200;
ods graphics / reset width=4in height=3in imagename='VBoxByCatPct';
title "Distribution of Cholesterol by Death Cause";
footnote j=l italic "Whisker Percentile = 99%";
proc sgplot data=sashelp.heart noborder;
vbox cholesterol / category=deathcause
boxwidth=0.2 meanattrs=(size=6) whiskerpct=1;
xaxis display=(noline nolabel noticks);
yaxis display=(noline noticks nolabel) grid;
run;
title;