using Imsl.Chart2D; using Imsl.Chart2D.QC; public class SamplePChart : FrameChart { static int sampleSize = 50; static int[] numberDefects = { 12, 15, 8, 10, 4, 7, 16, 9, 14, 10, 5, 6, 17, 12, 22, 8, 10, 5, 13, 11, 20, 18, 24, 15, 9, 12, 7, 13, 9, 6 }; public SamplePChart() { Chart chart = this.Chart; AxisXY axis = new AxisXY(chart); PChart pchart = new PChart(axis, sampleSize, numberDefects); pchart.LowerControlLimit.SetTitle("lcl = {0:0.00%}"); pchart.CenterLine.SetTitle("center = {0:0.00%}"); pchart.UpperControlLimit.SetTitle("ucl = {0:0.00%}"); axis.AxisX.AxisTitle.SetTitle("Sample Number"); axis.AxisX.AxisLabel.TextFormat = "0"; axis.AxisY.AxisTitle.SetTitle("Percent Defective"); axis.AxisY.AxisLabel.TextFormat = "P0"; } public static void Main(string[] argv) { System.Windows.Forms.Application.Run(new SamplePChart()); } }