Data visualization with SAS programming

Histogram with frequency count

Reply
Contributor
Posts: 71

Histogram with frequency count

Hi I am using below codes to make a histogram

 

proc univariate data=filename noprint;
histogram VAR1 ;
run;

 

I am getting histogram in the output but with Percentage and I want with Frequency count. Could anybody please help me on the same.

 

Grand Advisor
Posts: 16,316

Re: Histogram with frequency count

I'm not seeing an option in PROC UNIVARIATE, but SGPLOT HISTOGRAM statement has a SCALE=Count option. 

 

Proc SGPLOT data=SASHELP.class;

hisotgram age / scale = count;

run;

SAS Super FREQ
Posts: 3,225

Re: Histogram with frequency count

The documentation for the HISTOGRAM statement in PROC UNIVARIATE shows that you can use 

VSCALE=COUNT

Other options are VSCALE=PERCENT (the default) and VSCALE=PROPORTION.

Post a Question
Discussion Stats
  • 2 replies
  • 151 views
  • 1 like
  • 3 in conversation