HISTOGRAM Statement: CAPABILITY Procedure

Customizing a Histogram

Note: See Histogram with Fitted Normal Curve in the SAS/QC Sample Library.

This example is a continuation of the preceding example. The following statements show how you can use HISTOGRAM statement options and INSET statements to customize a histogram:

title 'Process Capability Analysis of Plating Thickness';
proc capability data=Trans noprint;
   spec lsl = 3.45 usl = 3.55;
   histogram Thick / normal
                     midpoints = 3.4 to 3.6 by 0.025
                     vscale    = count
                     odstitle  = title
                     nospeclegend;
   inset lsl usl;
   inset n mean (5.2) cpk (5.2);
run;

The histogram is displayed in FigureĀ 5.11.

Figure 5.11: Customizing the Appearance of the Histogram

Customizing the Appearance of the Histogram


The MIDPOINTS= option specifies a list of values to use as bin midpoints. The VSCALE= COUNT option requests a vertical axis scaled in counts rather than percents. The INSET statements inset the specification limits and summary statistics. The NOSPECLEGEND option suppress the default legend for the specification limits that is shown in FigureĀ 5.8.

For more information about HISTOGRAM statement options, see the section Dictionary of Options. For details on the INSET statement, see INSET Statement: CAPABILITY Procedure.