3.6.4.34 OneQCLine (macro)

Draws a horizontal line at Y = lineNameValue across the active graph window. The line is labeled with its given name and its value (i.e. lineNameValue = $(lineNameValue) or CL = $(lineNameValue) ). Window:Refresh or the command should be executed after OneQCLine is run to update the graph window. OneQCLine is used by the template QC.OTW which is used to create QC charts

Definition:

Def  OneQCLine {
  draw -Name QC.%1 -L %1;
  if (%1=="Ave")
     label -Offset 2 (-10) -Coor X2 %1 -s -n TQC.%1 (CL=$(%1,*4*));
  else
     label -Offset 2 (-10) -Coor X2 %1 -s -n TQC.%1 (%1 = $(%1,*4*));
}

Example:

The following script draws a horizontal line at Y=5 in the active graph window and then names and labels the line UCL=5.

UCL=5;
OneQCLine UCL;