%let gpath='C:\'; %let dpi=200; ods html close; ods listing gpath=&gpath image_dpi=&dpi; /*--Graph with Character Symbols--*/ ods graphics / reset width=5in height=3in imagename="Symbol_Char"; Title 'Weight by Height by Gender for Class'; proc sgplot data= sashelp.class; symbolchar name=male char='2642'x / textattrs=(family='Arial Unicode MS' weight=bold); symbolchar name=female char='2640'x / textattrs=(family='Arial Unicode MS' weight=bold); styleattrs datasymbols=(male female); scatter y=weight x=height / group=sex name='a' markerattrs=(color=black size=30) dataskin=sheen; keylegend / location=inside position=topleft opaque; xaxis grid offsetmin=0.05 offsetmax=0.05; yaxis grid offsetmin=0.05 offsetmax=0.05;; run; title; footnote; proc sort data=sashelp.cars(keep=Type Horsepower mpg_city msrp origin where=(msrp > 35000 and type in ('Sedan', 'Sports', 'SUV', 'Truck') and origin='USA')) out=cars; by type; run; /*proc print; run;*/ /*--Graph with image icons--*/ ods graphics / reset width=5in height=3in imagename="Image_Group"; Title 'Mileage by Horsepower for some Vehicles'; proc sgplot data=cars noautolegend; symbolimage name=sedan image='C:\Sedan_Trans.png'; symbolimage name=sports image='C:\Sports_Trans.png'; symbolimage name=suv image='C:\SUV_Trans.png'; symbolimage name=truck image='C:\Truck_Trans.png'; styleattrs datasymbols=(suv sedan sports truck); scatter x=horsepower y=mpg_city / group=type markerattrs=(size=50); xaxis grid offsetmin=0.05 offsetmax=0.05; yaxis grid offsetmin=0.05 offsetmax=0.05;; run; title; footnote; /*--Classification using angle--*/ ods graphics / reset width=5in height=3in imagename="Angle_Group"; Title 'Weight by Height by Gender for Class'; proc sgplot data= sashelp.class; symbolchar name=male char='25AC'x / textattrs=(family='Arial Unicode MS' weight=bold) rotate=0; symbolchar name=female char='25AC'x / textattrs=(family='Arial Unicode MS' weight=bold) rotate=90; styleattrs datasymbols=(male female); scatter y=weight x=height / group=sex name='a' markerattrs=(color=black size=30) dataskin=sheen; keylegend / location=inside position=topleft opaque; xaxis grid offsetmin=0.05 offsetmax=0.05; yaxis grid offsetmin=0.05 offsetmax=0.05;; run; title; footnote;