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

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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
  • 1851 views
  • 0 likes
  • 3 in conversation