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

Is there a way to display all the categories on the yaxis in an sgplot hbar instead of every alternate ones?

 

for example in the following every second make of car is skipped

 

proc sgplot data=sashelp.cars;

hbar make/response=invoice stat=mean;

yaxis display=all;

run; 

 

Thanks!

 

1 ACCEPTED SOLUTION

Accepted Solutions
PGStats
Opal | Level 21

Add fitpolicy=none

 

proc sgplot data=sashelp.cars;
hbar make/response=invoice stat=mean;
yaxis display=all fitpolicy=none;
run; 
PG

View solution in original post

4 REPLIES 4
PGStats
Opal | Level 21

Add fitpolicy=none

 

proc sgplot data=sashelp.cars;
hbar make/response=invoice stat=mean;
yaxis display=all fitpolicy=none;
run; 
PG
ghosh
Barite | Level 11

Thanks PGStats, this works perfectly.

 

Regards

Aroop

Ksharp
Super User

Make your graph bigger.

 

ods graphics/height=800px;
proc sgplot data=sashelp.cars;
hbar make/response=invoice stat=mean;
yaxis display=all;
run; 
ghosh
Barite | Level 11

Thanks KSharp for your suggestion.  It might work in some cases, however,  my page layout is already set, I must stay within the boundary.  My apologies for not stating this constraint in my request.

 

Regards,

Aroop

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!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1416 views
  • 0 likes
  • 3 in conversation