Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
INSET Statement

Customizing Labels and Formatting Values

By default, each inset statistic is identified with an appropriate label, and each numeric value is printed using an appropriate format. However, you may want to provide your own labels and formats. For example, in Figure 28.1 the default label used for the NEXCL statistic is rather long. The following statements produce a comparative Pareto chart with insets using a shorter label for the number of excluded observations. A format with one decimal place is also specified for each statistic. Note that a single INSET statement produces an inset in each cell of the comparative Pareto chart.

   title 'Comparison of IC Failures';
   proc pareto data=failure3;
      vbar cause / 
         class    = stage
         freq     = counts
         maxncat  = 5
         classkey = 'Before Cleaning'
         cframe   = ligr
         cbars    = vigb
         cconnect = salmon;
      inset n (3.1) nexcl='N Excl' (3.1) /
         cfill = ywh ctext = vigb height = 3;
   run;

The resulting chart is displayed in Figure 28.2. You can provide your own label by specifying the keyword for that statistic followed by an equal sign (=) and the label in quotes. The label can have up to 24 characters.

The format 3.1 specified in parentheses after the N and NEXCL keywords displays those statistics with a field width of three and one decimal place. In general, you can specify any numeric SAS format in parentheses after an inset keyword. You can also specify a format to be used for all the statistics in the INSET statement with the FORMAT= option. For more information about SAS formats, refer to Chapter 14 of SAS Language Reference: Dictionary.

Note that if you specify both a label and a format for a statistic, the label must appear before the format.

parigs2.gif (5936 bytes)

Figure 28.2: Customizing Labels and Formatting Values in an Inset

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.