BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
TX_STAR
Obsidian | Level 7

Hello members,
I want to create histograms from different data sets with the same vertical and horizontal axes (e.g., same min, max, unit). I used the proc freq as below. However, I did not find a way to adjust the min, max, unit of the histogram. are there other procedures to do it. Can anyone please help?

proc freq data=data;
tables score/plots=freqplot;
run;


Many thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

If you want to control graphics then likely you want to use a graphics procedure like Proc SGPLOT.

The Histogram statement will create histograms.

You could control the range of values for the axis with a yaxis and xaxis statements though you should likely use the Histogram SCALE=Percent option for the y values in your histogram .

 

You need to describe what you mean by "adjust the unit of the histogram". If you mean number of tick marks or groups then that might be the NBINS option on a histogram statement.

View solution in original post

1 REPLY 1
ballardw
Super User

If you want to control graphics then likely you want to use a graphics procedure like Proc SGPLOT.

The Histogram statement will create histograms.

You could control the range of values for the axis with a yaxis and xaxis statements though you should likely use the Histogram SCALE=Percent option for the y values in your histogram .

 

You need to describe what you mean by "adjust the unit of the histogram". If you mean number of tick marks or groups then that might be the NBINS option on a histogram statement.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 886 views
  • 0 likes
  • 2 in conversation