BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

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.

 

 

View solution in original post

3 REPLIES 3
ballardw
Super User

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.

 

 

hlamoureux
Obsidian | Level 7

data LUscores;
set WORK.'lu scores'n;
format sid 8.6;
format fpdtop 8.6;


sid=sidscore*1;

FPDtop=fpdScoreTOP*1;







run;
proc univariate data=luscores;
var

SID

fpdTOP
converted_PBJ_FUNDED_RATE

Factor_trust_BAI_score
DNAccountValidationScore
FraudPoint
FPDMIDScore
NCGNSMIDScore
FTCheckAdvisorScore
LendProtectScore
PMTScore
FPDScore
;
histogram;
run;
ballardw
Super User

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.

SAS Innovate 2025: Call for Content

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!

Submit your idea!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 468 views
  • 0 likes
  • 2 in conversation