FOCUS AREAS

Graphics

jitter on a discrete axis
Base SAS: Graph Template Language

%let gpath='.';
%let dpi=100;

data cars;
  set sashelp.cars(where=(type in ('Sedan', 'Sports', 'Truck'))
                   keep=type origin mpg_city);
 run;

proc template;
  define statgraph Cars_Jitter;
    begingraph;
      entrytitle 'Mileage by Origin and Type';
      layout datalattice columnvar=origin/ columnweight=proportional;
        layout prototype;
          barchart x=type y=mpg_city / stat=mean dataskin=gloss;
          scatterplot x=type y=mpg_city / jitter=auto filledoutlinedmarkers=true 
            markerattrs=(symbol=circlefilled size=11) markerfillattrs=graphdata3
            dataskin=gloss datatransparency=0.6;
        endlayout;
      endlayout;
    endgraph;
  end;
run;

ods _all_ close;
ods listing gpath=&gpath image_dpi=&dpi;

ods graphics / reset width=6.93in height=3.15in imagename='V94_Jitter_cars';
proc sgrender data=cars template=Cars_Jitter;
  dynamic _trans=0.8;
run;
ods _all_ close;