BookmarkSubscribeRSS Feed
mcmaxwell
Fluorite | Level 6

Hi everyone, 

Is there a simple way to specify the maximum value to show on the Y axis in proc sgplot? I'm using the code below to make a simple bar graph and it returns a graph where the Y axis goes up to 15, but I would like it to go up to 20. 

 

ods graphics on / width=3.5in height=4.5in;  
proc sgplot data=new;        
	vbar cPLTL / response=percent group =cPLTL groupdisplay=cluster barwidth=.5;
	styleattrs datacolors=(CXFF8000 CX0000FF); 
	yaxis label="Percent of unsuccessful students";   
	xaxis display=(nolabel); 
	run;      
ods graphics off 
2 REPLIES 2
PaigeMiller
Diamond | Level 26
yaxis label="Percent of unsuccessful students" values=(0 to 0.2 by 0.05);
--
Paige Miller
Ksharp
Super User
yaxis label="Percent of unsuccessful students" max=20 ;

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!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 615 views
  • 0 likes
  • 3 in conversation