data unemp; input Age Ethnicity $ unemp_rate; datalines; 16 White 22.3 20 White 13 25 White 7.9 35 White 6.4 55 White 6.1 16 Asian 26.4 20 Asian 11.9 25 Asian 6.0 35 Asian 5.8 55 Asian 6.3 16 Hispanic 28.6 20 Hispanic 16.6 25 Hispanic 10.6 35 Hispanic 9.2 55 Hispanic 9.2 16 Black 41.3 20 Black 25.7 25 Black 18.7 35 Black 12.3 55 Black 9.4 ; run; /* normalize percentage values to a [0-1] scale for the Percent. format */ data unemployment(drop=unemp_rate); set work.unemp; format unemployment_rate Percent6.1; label unemployment_rate='Unemployment Rate'; unemployment_rate = unemp_rate / 100; run; proc template; define statgraph heatmap; begingraph / designheight=240; entrytitle 'Unemployment in the USA by Ethnicity in Q2, 2011'; rangeattrmap name="rmap"; range 0 - max / rangecolormodel=(white darkblue); endrangeattrmap; rangeattrvar attrmap="rmap" var=unemployment_rate attrvar=pColor; layout overlay / yaxisopts=(display=(ticks tickvalues line)) ; heatmapparm x=Age y=Ethnicity colorresponse=pColor / xboundaries=(16 20 25 35 55 65) xvalues=leftpoints xendlabels=true name="heatmap"; continuouslegend "heatmap"; endlayout; endgraph; end; run; proc sgrender data=unemployment template=heatmap; run;