FOCUS AREAS

Graphics

Frequencies by Origin and Type
Base SAS: ODS Graphics Procedure: SGPLOT

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

ods html close;
ods listing gpath=&gpath image_dpi=&dpi style=analysis;

data cars;
  set sashelp.cars(where=(type ne 'Hybrid'));
run;

/*--VBar Stacked--*/
ods graphics / reset width=5in height=3.75in noborder imagename='VBar_Segment_Labels';
title 'Frequencies by Origin and Type';
footnote j=l 'Segment and Bar Labels';
proc sgplot data=cars nowall noborder;
  vbar type / group=origin dataskin=pressed 
           groupdisplay=stack seglabel seglabelfitpolicy=none 
           seglabelattrs=(size=5 weight=bold) baselineattrs=(thickness=0) 
           datalabel datalabelattrs=(color=maroon weight=bold);
  keylegend / title='' location=inside position=topright across=1;
  xaxis display=(nolabel);
  yaxis grid display=(noline noticks) offsetmin=0;
  run;

title;
footnote;