%let gpath='.'; %let dpi=200; ods html close; ods listing gpath=&gpath image_dpi=&dpi; /*--Define attributes map data set--*/ data AttrMap; length id value fillcolor $15; id='Coffee'; value='Expresso'; fillcolor='cx4f2f00'; output; id='Coffee'; value='Chocolate'; fillcolor='cx7f2f2f'; output; id='Coffee'; value='Steamed Milk'; fillcolor='cream'; output; id='Coffee'; value='Milk Foam'; fillcolor='cxefe7e0'; output; run; ods html; proc print;run; ods html close; data coffee; input Name $1-20 Group $21-40 Value low high; mid=(low+high)/2; y=0; ysteam=1.3; datalines; Expresso Expresso 0.25 0.0 0.25 Macchiato Expresso 0.25 0.0 0.25 Macchiato Milk Foam 0.25 0.25 0.5 Cafe Latte Expresso 0.25 0.0 0.25 Cafe Latte Steamed Milk 0.50 0.25 0.75 Cafe Latte Milk Foam 0.25 0.75 1.0 Cafe Mocha Expresso 0.25 0.0 0.25 Cafe Mocha Chocolate 0.25 0.25 0.50 Cafe Mocha Steamed Milk 0.25 0.50 0.75 Cafe Mocha Milk Foam 0.25 0.75 1.0 ; run; ods html; proc print data=coffee; var Name Group Value; run; ods html close; /*--Infographics Icons--*/ %let cup=\Coffee_800_t4_Cleaned.png; %let steam=\CoffeeSteam_800.png; /*--HighLow Only--*/ ods graphics / reset width=3.2in height=1.5in imagename='Coffee_HighLow'; title j=l h=1 'Coffee Recepies'; proc sgplot data=Coffee noborder noautolegend nocycleattrs dattrmap=attrmap pad=(bottom=10pct); highlow x=name low=low high=high / group=group type=bar nooutline barwidth=0.7 name='a' attrid=Coffee; keylegend 'a'; xaxis display=( nolabel noticks) offsetmin=0.12 offsetmax=0.12; yaxis display=none min=0 max=1 offsetmin=0.15 offsetmax=0.42 values=(0 0.5 1); run; /*--HighLow with Text--*/ ods graphics / reset width=3.2in height=1.5in imagename='Coffee_HighLow_Text'; title j=l h=1 'Coffee Recepies'; proc sgplot data=Coffee noborder noautolegend nocycleattrs dattrmap=attrmap pad=(bottom=20pct); highlow x=name low=low high=high / group=group type=bar nooutline barwidth=0.7 name='a' attrid=Coffee; text x=name y=mid text=group / backlight=0.4 textattrs=(size=6 color=white); xaxis display=( nolabel noticks) offsetmin=0.12 offsetmax=0.12; yaxis display=none min=0 max=1 offsetmin=0.15 offsetmax=0.42 values=(0 0.5 1); run; /*--HighLow with Text and Coffee Cup Mask--*/ ods graphics / reset width=3.2in height=1.5in imagename='Coffee_HighLow_Text_Mask'; title j=l h=1 'Coffee Recepies'; proc sgplot data=Coffee noborder noautolegend nocycleattrs dattrmap=attrmap pad=(bottom=20pct); symbolimage name=Cup image="&cup" / voffset=0.15; highlow x=name low=low high=high / group=group type=bar nooutline barwidth=0.7 name='a' attrid=Coffee; scatter x=name y=y / markerattrs=(symbol=Cup size=100); text x=name y=mid text=group / backlight=0.4 textattrs=(size=6 color=white); xaxis display=( nolabel noticks) offsetmin=0.12 offsetmax=0.12; yaxis display=none min=0 max=1 offsetmin=0.15 offsetmax=0.44 values=(0 0.5 1); run; /*--HighLow with Text and Coffee Cup Mask and steam--*/ ods graphics / reset width=3.2in height=1.5in imagename='Coffee_HighLow_Text_Mask_Steam'; title j=l h=1 'Coffee Recepies'; proc sgplot data=Coffee noborder noautolegend nocycleattrs dattrmap=attrmap pad=(bottom=20pct); symbolimage name=Cup image="&cup" / voffset=0.15; symbolimage name=Steam image="&steam" / voffset=0; highlow x=name low=low high=high / group=group type=bar nooutline barwidth=0.7 name='a' attrid=Coffee; scatter x=name y=y / markerattrs=(symbol=Cup size=100); scatter x=name y=ysteam / markerattrs=(symbol=Steam size=100); text x=name y=mid text=group / backlight=0.4 textattrs=(size=6 color=white); xaxis display=( nolabel noticks) offsetmin=0.12 offsetmax=0.12; yaxis display=none min=0 max=1 offsetmin=0.15 offsetmax=0.44 values=(0 0.5 1); run;