'Newtubes' data created via DATALINES with nested loops to generate batch identifiers (Batch).
1 Code Block
DATA STEP Data
Explanation : Dataset creation with continuous reading (@code_sas_json/8_SAS_Intro_ReadFile_MultiCol_@@.json) of diameter values. Nested DO loops generate the 'Batch' group variable (15 batches) with 5 observations per batch.
Explanation : Generation of a standard box plot with ODS Graphics enabled. Displays the diameter distribution for each batch.
Copied!
ods graphics on;
title 'Box Plot for New Copper Tubes' ;
proc boxplot data=Newtubes;
plot Diameter*Batch / odstitle = title;
run;
1
ods graphics on;
2
title 'Box Plot for New Copper Tubes' ;
3
PROC BOXPLOTDATA=Newtubes;
4
plot Diameter*Batch / odstitle = title;
5
RUN;
3 Code Block
PROC BOXPLOT
Explanation : Generation of the plot with the 'clipfactor=1.5' option. This option truncates boxes whose whiskers would extend too far (extreme values), allowing zooming in on the central distribution.
Copied!
title 'Box Plot for New Copper Tubes' ;
proc boxplot data=Newtubes;
plot Diameter*Batch /
odstitle = title
clipfactor = 1.5;
run;
1
title 'Box Plot for New Copper Tubes' ;
2
PROC BOXPLOTDATA=Newtubes;
3
plot Diameter*Batch /
4
odstitle = title
5
clipfactor = 1.5;
6
RUN;
4 Code Block
PROC BOXPLOT
Explanation : Enhanced version of the truncated chart. The 'cliplegend' option adds an explanatory legend and 'clipsubchar' defines the '#' character to mark batches that have been truncated.
Copied!
title 'Box Plot for New Copper Tubes' ;
proc boxplot data=Newtubes;
plot Diameter*Batch /
odstitle = title
clipfactor = 1.5
cliplegend = '# Clipped Boxes'
clipsubchar = '#';
run;
1
title 'Box Plot for New Copper Tubes' ;
2
PROC BOXPLOTDATA=Newtubes;
3
plot Diameter*Batch /
4
odstitle = title
5
clipfactor = 1.5
6
cliplegend = '# Clipped Boxes'
7
clipsubchar = '#';
8
RUN;
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. WeAreCAS is an independent community site and is not affiliated with SAS Institute Inc.
This site uses technical and analytical cookies to improve your experience.
Read more.