BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
bhr-q
Pyrite | Level 9

 

with the following code, the chart displays a label " p-chart for yes_answer1" at the top, under the main chart title.

I have two questions about that:

  • How to remove that, i.e "p-chart for yes_answer1" ?
  •  How can I modify the chart so that the main title " P-chart of Patient Counseling by Quarter" appears at the top of the chart instead of "p-chart for yes_answer1"

title "P-chart of Patient Counseling by Quarter";
proc shewhart data=tmp2;
pchart yes_answer1*quarter/ markers  subgroupn = total_count1 
nohlabel ;
LABEL yes_answer1 ="Proportion of pts counselled"; /*this would be for y axis and no issue with this*/
run; title;

1 ACCEPTED SOLUTION

Accepted Solutions
sbxkoenk
SAS Super FREQ

Start with

ods graphics off;

and use regular TITLE statement.

 

When using ODS Graphics with PROC SHEWHART

ods graphics on;

(the default)

, you will not be able to use a regular TITLE statement to add a title to the graph.  

However, you can use the ODSTITLE option on the PCHART statement, such as:

   pchart &v * _YEAR_MONTH / subgroupn = population
                        ODSTITLE='My New Shewhart Title'

Koen

View solution in original post

5 REPLIES 5
sbxkoenk
SAS Super FREQ

Start with

ods graphics off;

and use regular TITLE statement.

 

When using ODS Graphics with PROC SHEWHART

ods graphics on;

(the default)

, you will not be able to use a regular TITLE statement to add a title to the graph.  

However, you can use the ODSTITLE option on the PCHART statement, such as:

   pchart &v * _YEAR_MONTH / subgroupn = population
                        ODSTITLE='My New Shewhart Title'

Koen

bhr-q
Pyrite | Level 9

With the first approach (ods graphics off; ), I will get this warning:

“WARNING: Traditional graphics are not available because either SAS/GRAPH is not licensed for your system, or the license has expired.”

So, I don’t have access to that.

sbxkoenk
SAS Super FREQ

Hello,

What SAS version are you using? Is it SAS 9.4 or SAS Viya?

 

Submit 

%put &=SYSVLONG4;

to find out (see LOG-screen for result).

 

To see the expiration dates for your SAS modules, you can submit:

  • proc setinit; run;  /*SAS 9.4*/  ... or
  • cas; proc cas; getLicensedProductInfo; quit; /*SAS Viya*/

When you cannot turn ODS GRAPHICS ... OFF ,

you can still use the ODSTITLE= option behind the forward slash on a pchart (p-chart) statement to get what you want.

 

Koen

bhr-q
Pyrite | Level 9

My SAS is 9.4 and I have a valid license, I can use the ODSTITLE= option behind the forward slash on a chart (p-chart) 

I was just wondering why I cannot turn ODS GRAPHICS ... OFF. Thanks

 

 

sbxkoenk
SAS Super FREQ

When I submit

proc setinit; run;

I get

---SAS/GRAPH
  14JUL2024 (CPU A)

 

When I submit

proc product_status; run;

I get

For SAS/GRAPH ...
   Custom version information: 9.4_M8

M8 = Maintenance Release 8 (another maintenance release will do as well of course). M6 or above is preferred though.

 

I think you need to see something similar in order to be able to turn ods graphics ... off .

 

Koen

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 5 replies
  • 819 views
  • 2 likes
  • 2 in conversation