%let gpath=C:\; ods html close; %let w=5in; %let h=3in; %let dpi=200; ods listing gpath="&gpath" image_dpi=&dpi; /*--Highlighted box plot--*/ ods graphics / reset width=&w height=&h imagename='BoxHighlight'; title 'Cholesterol by Death Cause'; proc sgplot data=sashelp.heart noborder; refline 'Coronary Heart Disease' / axis=x lineattrs=(thickness=70 color=yellow) transparency=0.6 ; vbox cholesterol / category=deathcause; yaxis offsetmin=0.05 offsetmax=0.05 display=(noline noticks) grid; xaxis offsetmin=0.1 offsetmax=0.1 display=(nolabel); run; /*--Compute means--*/ proc means data=sashelp.cars noprint; class type; var mpg_city; output out=cars(where=(_type_=1)) Mean=mean; run; data cars; set cars(where=(type ne 'Hybrid')); if mean > 20 then highlight=type; run; /*proc print; run;*/ /*--Highlighted BarChart--*/ ods graphics / reset width=&w height=&h imagename='BarHighlight'; title 'Average City Mileage by Type'; proc sgplot data=cars noborder; refline highlight / axis=x lineattrs=(thickness=100 color=gold) transparency=0.4 ; vbar type / response=mean dataskin=pressed fillattrs=graphdata2 barwidth=0.7; yaxis offsetmin=0.0 offsetmax=0.05 display=(noline noticks) grid; xaxis offsetmin=0.1 offsetmax=0.1 display=(nolabel); run; title; footnote;