ods html close; %let gpath='C:\Work\Blogs\Graphically Speaking\2012\Post_21Apr_2012_DiscreteAttrMapOnly'; ods listing style=htmlblue image_dpi=100 gpath=&gpath; proc template; define statgraph DiscreteAttrMapOnly; dynamic _type; begingraph; discreteattrmap name="Product"; value "Chairs" / markerattrs=(symbol=circlefilled color=blue) lineattrs=(color=blue thickness=2); value "Tables" / markerattrs=(symbol=trianglefilled color=green) lineattrs=(color=green thickness=2); value "Lamps" / markerattrs=(symbol=squarefilled color=red) lineattrs=(color=red thickness=2); enddiscreteattrmap; layout overlay / walldisplay=none yaxisopts=(display=none) xaxisopts=(display=none); scatterplot x=height y=weight / markerattrs=(size=0); discretelegend "Product" / type=_type across=3 location=inside halign=center valign=center displayclipped=true; endlayout; endgraph; end; run; ods graphics / reset noscale noborder maxlegendarea=100 width=4in height=0.6in imagename='DiscreteAttrMapOnly_Marker'; proc sgrender data=sashelp.class template=DiscreteAttrMapOnly; dynamic _type='Marker'; run; ods graphics / reset noscale noborder maxlegendarea=100 width=4in height=0.6in imagename='DiscreteAttrMapOnly_Line'; proc sgrender data=sashelp.class template=DiscreteAttrMapOnly; dynamic _type='Line'; run;