Histograms with INSET Statement Features

/****************************************************************/
/*          S A S   S A M P L E   L I B R A R Y                 */
/*                                                              */
/*    NAME: CAPINS1                                             */
/*   TITLE: Histograms with INSET Statement Features            */
/* PRODUCT: QC                                                  */
/*  SYSTEM: ALL                                                 */
/*    KEYS: Capability Analysis, Insets,                        */
/*   PROCS: CAPABILITY                                          */
/*    DATA:                                                     */
/*                                                              */
/* SUPPORT: saswgr                                              */
/*     REF: SAS/QC Software:  Usage and Reference, Version 6,   */
/*          First Edition, Volume 1 and Volume 2                */
/*    MISC:                                                     */
/*                                                              */
/*  Examples in the documentation were created using the        */
/*    statement:  ods listing style=statistical;                */
/*                                                              */
/****************************************************************/

data Wire;
   label Strength='Torsion Strength in lb/in';
   input Strength @@;
   datalines;
25 25 36 31 26 36 29 37 37 20
34 27 21 35 30 41 33 21 26 26
19 25 14 32 30 29 31 26 22 24
34 33 28 26 43 30 40 32 32 31
25 26 27 34 33 27 33 29 30 31
;

ods graphics off;
title 'Torsion Strength of Copper Wire';
proc capability data=Wire noprint;
   spec lsl=22 usl=38;
   histogram Strength;
   inset n min max mean std;
run;

ods graphics on;
proc capability data=Wire noprint;
   spec lsl=22 usl=38;
   histogram Strength;
   inset n='Sample Size' min max mean std='Std Dev' (5.2);
run;

ods graphics off;
title 'Torsion Strength of Copper Wire';
proc capability data=Wire noprint;
   spec lsl=22 usl=38;
   histogram Strength;
   inset n='Sample Size' min max range mode sum mean
      std='Standard Deviation' var stdmean skewness
      kurtosis / format = 6.1
                 pos    = rm
                 header = 'Data Summary' cfill = ywh;
run;