/***************************************************************************************************************** SAS file name: Histogram.sas File location: _________________________________________________________________________________________________________________ Purpose: To demonstrate how to draw histograms in SAS with PROC SGPLOT Author: Peter Clemmensen Creation Date: 14/10/2017 This program supports the example page "SAS Histogram In PROC SGPLOT" on SASnrd.com *****************************************************************************************************************/ /* Histograms with PROC SGPLOT */ proc sgplot data=sashelp.iris; histogram sepallength; run; title "Histogram of Sepal Length"; proc sgplot data=sashelp.iris; histogram sepallength / group=species transparency=0.5 scale=count; density sepallength / type=normal group=species; keylegend / location=inside position=topright across=1; run; title; /* Histograms with PROC UNIVARIATE */ ods select Histogram; proc univariate data=sashelp.iris; histogram sepallength / normal(color=blue) ctext = blue midpoints = 45 to 80 by 2.5; run; ods select all;