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.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.