import com.imsl.chart.*; import com.imsl.chart.qc.*; public class SampleXbarS extends JFrameChart { static final double diameter[][] = { {74.03, 74.002, 74.019, 73.992, 74.008}, {73.995, 73.992, 74.001, 74.011, 74.004}, {73.988, 74.024, 74.021, 74.005, 74.002}, {74.002, 73.996, 73.993, 74.015, 74.009}, {73.992, 74.007, 74.015, 73.989, 74.014}, {74.009, 73.994, 73.997, 73.985, 73.993}, {73.995, 74.006, 73.994, 74, 74.005}, {73.985, 74.003, 73.993, 74.015, 73.988}, {74.008, 73.995, 74.009, 74.005, 74.004}, {73.998, 74, 73.99, 74.007, 73.995}, {73.994, 73.998, 73.994, 73.995, 73.99}, {74.004, 74, 74.007, 74, 73.996}, {73.983, 74.002, 73.998, 73.997, 74.012}, {74.006, 73.967, 73.994, 74, 73.984}, {74.012, 74.014, 73.998, 73.999, 74.007}, {74, 73.984, 74.005, 73.998, 73.996}, {73.994, 74.012, 73.986, 74.005, 74.007}, {74.006, 74.01, 74.018, 74.003, 74}, {73.984, 74.002, 74.003, 74.005, 73.997}, {74, 74.01, 74.013, 74.02, 74.003}, {73.982, 74.001, 74.015, 74.005, 73.996}, {74.004, 73.999, 73.99, 74.006, 74.009}, {74.01, 73.989, 73.99, 74.009, 74.014}, {74.015, 74.008, 73.993, 74, 74.01}, {73.982, 73.984, 73.995, 74.017, 74.013} }; public SampleXbarS() { Chart chart = getChart(); AxisXY axis = new AxisXY(chart); XbarS xbars = new XbarS(axis, diameter); xbars.getUpperControlLimit().setTitle("ucl = {0,number,0.0000}"); axis.getAxisX().getAxisTitle().setTitle("Sample Number"); axis.getAxisX().getAxisLabel().setTextFormat("0"); axis.getAxisY().getAxisTitle().setTitle("Piston Ring Diameter"); axis.getAxisY().setAutoscaleInput(axis.AUTOSCALE_OFF); axis.getAxisY().setWindow(73.985, 74.015); } public static void main(String argv[]) { new SampleXbarS().setVisible(true); } }