Show your code for the graph
What is the format for the x-axis variable.
This sort of behavior usually points to a format that does not display decimals and the axis wants to use decimals because of the range of values.
Fixes could be supply a Values= list on an xaxis statement, make the axis discrete which is often appropriate for Code values, change the format to display decimals
Which is best depends on the actual data involved.
Show your code for the graph
What is the format for the x-axis variable.
This sort of behavior usually points to a format that does not display decimals and the axis wants to use decimals because of the range of values.
Fixes could be supply a Values= list on an xaxis statement, make the axis discrete which is often appropriate for Code values, change the format to display decimals
Which is best depends on the actual data involved.
If you want Proc Univariate to only display single values try adding the MIDPOINT option to your Histogram statement.
I think from your given picture this might work if your values are only integers 0 to 6.
Histogram /midpoints=0 1 2 3 4 5 6;
If your variables have different ranges of values you would specify a separate histogram statement listing the variables before the / and the specific values for those variables.
Note: if your data is originating from a 0 to 10 scale or similar for ALL the variables and you just don't have some values for some variables you could set the midpoints to use the entire scale and then all the graphs would use the same midpoints.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.