import com.imsl.chart.*; import com.imsl.chart.qc.*; public class SamplePChartUnequal extends JFrameChart { static final int sampleSize[] = { 100, 80, 80, 100, 110, 110, 100, 100, 90, 90, 110, 120, 120, 120, 110, 80, 80, 80, 90, 100, 100, 100, 100, 90, 90 }; static final int numberDefects[] = { 12, 8, 6, 9, 10, 12, 11, 16, 10, 6, 20, 15, 9, 8, 6, 8, 10, 7, 5, 8, 5, 8, 10, 6, 9 }; public SamplePChartUnequal() { Chart chart = getChart(); AxisXY axis = new AxisXY(chart); PChart pchart = new PChart(axis, sampleSize, numberDefects); pchart.getCenterLine().setTitle("center = {0,number,0.00%}"); axis.getAxisX().getAxisTitle().setTitle("Sample Number"); axis.getAxisX().getAxisLabel().setTextFormat("0"); axis.getAxisY().getAxisTitle().setTitle("Percent Defective"); axis.getAxisY().getAxisLabel().setTextFormat("percent"); axis.getAxisY().setWindow(0.0, 0.2); axis.getAxisY().setAutoscaleInput(0); } public static void main(String argv[]) { new SamplePChartUnequal().setVisible(true); } }