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

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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