FOCUS AREAS

Graphics

Distribution of Blood Pressure
Base SAS: ODS Graphics Procedure: SGPLOT

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

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

data heart;
  set sashelp.heart(keep=systolic diastolic);
  output;
  do i=1 to 200;
    systolic=systolic*(1+0.05*(ranuni(2)-0.5));
    diastolic=diastolic*(1+0.05*(ranuni(2)-0.5));
    output;
  end;
run;

ods graphics / reset width=5in height=3.75in imagename='Heat_Map_SG';
title 'Distribution of Blood Pressure';
footnote j=l 'SAS 9.4 Heat Map with 100 x 60 bins for 1 Million observations';
proc sgplot data=heart(where=(systolic < 250 and diastolic < 150));
  heatmap x=systolic y=diastolic / colormodel=(white green yellow red)
          nxbins=100 nybins=60 name='a';
  reg x=systolic y=diastolic / nomarkers degree=2 legendlabel='Fit';
  gradlegend 'a';
  keylegend / linelength=20 location=inside position=topright noborder;
run;

title;
footnote;