Positioning the Inset on an ANOM Chart Using Compass Points

/*************************************************************************/
/*          S A S   S A M P L E   L I B R A R Y                          */
/*                                                                       */
/*    NAME: ANMIN4                                                       */
/*   TITLE: Positioning the Inset on an ANOM Chart Using Compass Points  */
/* PRODUCT: QC                                                           */
/*  SYSTEM: ALL                                                          */
/*    KEYS: ANOM Charts, Mean Charts, Inset, Positioning, Compass Points */
/*   PROCS: ANOM                                                         */
/*    DATA:                                                              */
/*                                                                       */
/* SUPPORT: saswgr                                                       */
/*     REF: PROC ANOM, INSET Statement, Details Example 1                */
/*                                                                       */
/*************************************************************************/

data LabelDeviations;
   input Position @;
   do i = 1 to 5;
      input Deviation @;
      output;
   end;
   drop i;
   datalines;
1  -0.02386  -0.02853  -0.03001  -0.00428  -0.03623
1  -0.04222  -0.00144  -0.06466   0.00944  -0.00163
2  -0.02014  -0.02725   0.02268  -0.03323   0.03661
2   0.04378   0.05562   0.00977   0.05641   0.01816
3  -0.00728   0.02849  -0.04404  -0.02214  -0.01394
3   0.04855   0.03566   0.02345   0.01339  -0.00203
4   0.06694   0.10729   0.05974   0.06089   0.07551
4   0.03620   0.05614   0.08985   0.04175   0.05298
5   0.03677   0.00361   0.03736   0.01164  -0.00741
5   0.02495  -0.00803   0.03021  -0.00149  -0.04640
6   0.00493  -0.03839  -0.02037  -0.00487  -0.01202
6   0.00710  -0.03075   0.00167  -0.02845  -0.00697
;


ods graphics off;
title 'Mean Chart for Diameters';
proc anom data=LabelDeviations;
   xchart Deviation*Position;
   inset n / height=3 cfill=ywh header='NW' pos=nw;
   inset n / height=3 cfill=ywh header='N ' pos=n ;
   inset n / height=3 cfill=ywh header='NE' pos=ne;
   inset n / height=3 cfill=ywh header='E ' pos=e ;
   inset n / height=3 cfill=ywh header='SE' pos=se;
   inset n / height=3 cfill=ywh header='S ' pos=s ;
   inset n / height=3 cfill=ywh header='SW' pos=sw;
   inset n / height=3 cfill=ywh header='W ' pos=w ;
run;