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;
Typically for SGPANEL the Y axis is the Rowaxis.
So add Max= 0.3 to your Rowaxis statement.
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;
Typically for SGPANEL the Y axis is the Rowaxis.
So add Max= 0.3 to your Rowaxis statement.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.
Ready to level-up your skills? Choose your own adventure.