BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Kaeslock223_
Fluorite | Level 6

I can't figure out where I am supposed to put y axis max value. I am trying to stop the y axis at 30 percent instead of the full 100. I've tried adding max=0.3 on the colaxis line but it does not work nor does it work on the panelby statement. I've also tried to make a new colaxis or replace the one I have, but it will not change the y-axis. Here is my code below.

 

ods graphics on / width=9in;
ods graphics on / height=7in;
proc sgpanel data = final;
title "Race Distribution of Hypertension events across Metroplex";
where Program= "Hypertension";
styleattrs datacolors=(blue green red purple orange pink yellow) datacontrastcolors=(blue green red purple orange pink yellow);
panelby a b c d e/columns=5 noheader spacing=0;
rowaxis label="Percentage of Frequency of Events";
label freq_race=".";
vbar freq_race/ group=Race stat=pct dataskin=matte;
keylegend/ outerpad=2;
colaxis display= (novalues noticks);
run;
title;

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

Typically for SGPANEL the Y axis is the Rowaxis.

So add Max= 0.3 to your Rowaxis statement.

View solution in original post

3 REPLIES 3
Reeza
Super User

So changing your colaxis statement to this does not work?

Can you show the log?

 

colaxis display= (novalues noticks) max = 0.3;
colaxis display= (novalues noticks) max = 30; *not sure what units are used;
ballardw
Super User

Typically for SGPANEL the Y axis is the Rowaxis.

So add Max= 0.3 to your Rowaxis statement.

Kaeslock223_
Fluorite | Level 6
Yes, that worked, thanks!

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
  • 3 replies
  • 1026 views
  • 1 like
  • 3 in conversation