using Imsl.Chart2D; using Imsl.Chart2D.QC; public class SampleEWMA : FrameChart { static double[] data = { 9.45, 7.99, 9.29, 11.66, 12.16, 10.18, 8.04, 11.46, 9.20, 10.34, 9.03, 11.47, 10.51, 9.40, 10.08, 9.37, 10.62, 10.31, 8.52, 10.84, 10.90, 9.33, 12.29, 11.50, 10.60, 11.08, 10.38, 11.62, 11.31, 10.52 }; public SampleEWMA() { Chart chart = this.Chart; AxisXY axis = new AxisXY(chart); double lambda = 0.10; double mean = 10.0; double stdev = 1.0; EWMA ewma = new EWMA(axis, data, lambda, mean, stdev); ewma.LowerControlLimit.ControlLimitValue = -2.7; ewma.UpperControlLimit.ControlLimitValue = 2.7; axis.AxisX.AxisTitle.SetTitle("Sample Number"); axis.AxisX.AxisLabel.TextFormat = "0"; axis.AxisY.SetWindow(9.3, 10.8); axis.AxisY.AutoscaleInput = 0; } public static void Main(string[] argv) { System.Windows.Forms.Application.Run(new SampleEWMA()); } }