BookmarkSubscribeRSS Feed
guaguncher
Obsidian | Level 7

I wanted to set a y-axis running from 0% to 100% for all my control charts using Proc Shewhart. However, it seems that the y-axis scale only ranges across the maximum and minimum of the dataset. Here are two codes I have tried:

 

ods graphics off; 
title 'Percentage of Hypertensive Patients with Scheduled Appointment'; 
symbol v=dot color=darkblue h=1.75; 
proc shewhart data=percentages;
	xchart a*b/ interval = month climits=red nolimitlabel nolegend vformat = percent10. vaxis = (0 to 1 by 0.1);
	label a='XXX' b = 'YYY'; 
run;

ods graphics off;
title 'ZZZ'; /*TITLE TO THE CHART*/
axis1 order = (0 to 1 by 0.1)
label=("XXX");
axis2 label = ("YYY"); 
symbol v=dot color=darkblue h=1.75; /*SYMBOL TYPE, COLOR AND DIAMETER*/
proc shewhart data=percentages;
xchart a*b/vaxis = axis1 haxis=axis2 interval = month climits=red nolimitlabel nolegend vformat=percent10.; 
run; 

 

1 REPLY 1

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
  • 1 reply
  • 405 views
  • 0 likes
  • 2 in conversation