Hello all,
I ran into a couple of problems when I was using the proc shewhart, which are as follows:
1. The symbol statements seems not working at all no matter what I set as the symbol value, color, etc. The output sticks to the default settings all the time.
2. For the clipped points, all the settings for symbol , color, clip factor are not working as well.
I am going to use an example to illustrate the problems I encounted:
data newtubes;
label Diameter='Diameter in mm';
do batch = 1 to 15;
do i = 1 to 5;
input Diameter @@;
output;
end;
end;
datalines;
69.13 69.83 70.76 69.13 70.81
85.06 82.82 84.79 84.89 86.53
67.67 70.37 68.80 70.65 68.20
71.71 70.46 71.43 69.53 69.28
71.04 71.04 70.29 70.51 71.29
69.01 68.87 69.87 70.05 69.85
50.72 50.49 49.78 50.49 49.69
69.28 71.80 69.80 70.99 70.50
70.76 69.19 70.51 70.59 70.40
70.16 70.07 71.52 70.72 70.31
68.67 70.54 69.50 69.79 70.76
68.78 68.55 69.72 69.62 71.53
70.61 70.75 70.90 71.01 71.53
74.62 56.95 72.29 82.41 57.64
70.54 69.82 70.71 71.05 69.24
;
run;
symbol value=dot color=black;
title 'Control Chart for New Copper Tubes' ;
proc shewhart data=newtubes;
xrchart Diameter*batch /
mu0 = 70
sigma0 = 0.75
clipfactor = 1.5
cclip=red
clipsymbol=star;
run;
After I ran the code in SAS, It only gave the graph with light blue connecting line, but without symbol. Furthermore, the cclip and clipsymbol options both have no impact on the output.
I have no idea what happened here. I would really appreciate it if anyone could help me with that.
Thanks,
Paul
Hi Paul,
SYMBOL statements and the CCLIP= and CLIPSYMBOL= options (among many other PROC SHEWHART options) apply only to traditional graphics output. Beginning with SAS 9.3, ODS Graphics is enabled by default in the SAS windowing environment. Therefore PROC SHEWHART produces ODS Graphics output by default. Symbols, colors, etc. for ODS Graphics output are controlled by the ODS style that is in effect.
You can disable ODS Graphics before running the procedure
ODS GRAPHICS OFF;
Bucky
Hi Paul,
SYMBOL statements and the CCLIP= and CLIPSYMBOL= options (among many other PROC SHEWHART options) apply only to traditional graphics output. Beginning with SAS 9.3, ODS Graphics is enabled by default in the SAS windowing environment. Therefore PROC SHEWHART produces ODS Graphics output by default. Symbols, colors, etc. for ODS Graphics output are controlled by the ODS style that is in effect.
You can disable ODS Graphics before running the procedure
ODS GRAPHICS OFF;
Bucky
Hello Bucky,
Wow. I did not realized it can be solved in such an easy way. That's awesome! I tried to fix that in all ways I can before I got the correct solution from you. Still have a lot to learn about SAS. Once again, thank you so much for all your help. I truly appreciate it.
Paul
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!
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.