IRCHARTS with Margin Plots

/****************************************************************/
/*          S A S   S A M P L E   L I B R A R Y                 */
/*                                                              */
/*    NAME: SHWIREX3                                            */
/*   TITLE: IRCHARTS with Margin Plots                          */
/* PRODUCT: QC                                                  */
/*  SYSTEM: ALL                                                 */
/*    KEYS: Shewhart Charts, Individual Measurements Charts,    */
/*   PROCS: SHEWHART                                            */
/*    DATA:                                                     */
/*                                                              */
/*     REF: SAS/QC Software:  Usage and Reference, Version 6,   */
/*          First Edition, Volume 1 and Volume 2                */
/*                                                              */
/****************************************************************/

data Engines;
   input ID Weight @@;
   label Weight='Engine Weight (lbs)'
         ID    ='Engine ID Number';
   datalines;
1711 1270   1712 1258   1713 1248   1714 1260
1715 1263   1716 1260   1717 1259   1718 1240
1719 1260   1720 1246   1721 1238   1722 1253
1723 1249   1724 1245   1725 1251   1726 1252
1727 1249   1728 1274   1729 1258   1730 1268
1731 1248   1732 1295   1733 1243   1734 1253
1735 1258
;


ods graphics on;
title 'Individual Measurements Chart and Histogram';
proc shewhart data=Engines;
   irchart Weight*ID /
      odstitle = title
      rtmplot  = histogram
      markers
      nochart2;
run;

title 'Individual Measurements Chart and Box-and-Whisker Plot';
proc shewhart data=Engines;
   irchart Weight*ID /
      odstitle = title
      ltmplot  = schematic
      ltmargin = 8
      markers
      nochart2;
run;