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!

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