%let gpath='C:\'; %let dpi=150; data healthcare; format Cost Deductible MaxOutOfPocket dollar6.0; input Plan $ Cost Deductible MaxOutOfPocket; datalines; Bronze 400 6300 6300 Silver 587 5000 6350 Gold 623 1250 5000 Platinum 810 500 1500 ; run; data healthcareGroup; keep Plan Type Value; length Type $14; format Value dollar6.0; set healthcare; Type='Annual Cost'; Value=cost*12; output; Type='Deductible'; Value=deductible; output; Type='Out Of Pocket'; Value=MaxOutOfPocket; output; run; ods html; proc print noobs; var Plan Type Value; run; ods html close; ods listing gpath=&gpath image_dpi=&dpi; ods graphics / reset width=3in height=2in imagename='HealthCareByPlan'; proc sgplot data=healthcareGroup; title 'Cost by Plan'; vbar plan / response=value group= type groupdisplay=cluster dataskin=gloss nostatlabel; xaxis display=(nolabel) discreteorder=data; yaxis grid display=(nolabel); run; ods listing gpath=&gpath image_dpi=&dpi; ods graphics / reset width=3in height=2in imagename='HealthCareByCost'; proc sgplot data=healthcareGroup; title 'Cost by Item'; vbar Type / response=value group= Plan groupdisplay=cluster dataskin=gloss nostatlabel grouporder=data; xaxis display=(nolabel) discreteorder=data; yaxis grid display=(nolabel); run; ods listing gpath=&gpath image_dpi=&dpi; ods graphics / reset width=3in height=2in imagename='HealthCareTotal'; proc sgplot data=healthcareGroup; title 'Total Cost by Plan'; vbar Plan / response=value group= Type groupdisplay=stack dataskin=gloss nostatlabel grouporder=data; xaxis display=(nolabel) discreteorder=data; yaxis grid display=(nolabel); run; ods listing gpath=&gpath image_dpi=&dpi; ods graphics / reset width=3in height=2in imagename='HealthCareTotal2'; proc sgplot data=healthcareGroup(where=(type ne 'Deductible')); title 'Total Cost by Plan'; vbar Plan / response=value group= Type groupdisplay=stack dataskin=gloss nostatlabel grouporder=data; xaxis display=(nolabel) discreteorder=data; yaxis grid display=(nolabel); run;