void page4() { fill(0); text("BLOCKING", 330, 20); line(50, 350, 650, 350); String t = "To the left is the histogram of the blocking process. The results for the Incentive Program 1 are shown in red for part time workers and green for full time ones. The results for the Incentive Program 2 are shown in cyan for part time workers and yellow for full time ones."; drawStrings(t, 700, 50, 25); t = "As seen, this technique decreases the variability due to known nuisance factors and improves the accuracy of our conclusions."; drawStrings(t, 700, 300, 25); int[] his3 = new int[54]; int[] his4 = new int[54]; int[] his5 = new int[54]; int[] his6 = new int[54]; int a; for (int i=0; i<100; i++) { a = int((data[i]-75.2)/0.4); a = constrain(a, 0, 53); his3[a]++; } for (int i=100; i<200; i++) { a = int((data[i]-75.2)/0.4); a = constrain(a, 0, 53); his4[a]++; } for (int i=200; i<300; i++) { a = int((data[i]-75.2)/0.4); a = constrain(a, 0, 53); his5[a]++; } for (int i=300; i<400; i++) { a = int((data[i]-75.2)/0.4); a = constrain(a, 0, 53); his6[a]++; } if (cb3.isSelected()) { fill(255, 0, 0); for (int i=0; i<54; i++) { rect(65+11*i, 350-10*his3[i], 9, 10*his3[i]); } } if (cb4.isSelected()) { fill(0, 255, 0); for (int i=0; i<54; i++) { rect(65+11*i, 350-10*his4[i], 9, 10*his4[i]); } } if (cb5.isSelected()) { fill(0, 255, 255); for (int i=0; i<54; i++) { rect(65+11*i, 350-10*his5[i], 9, 10*his5[i]); } } if (cb6.isSelected()) { fill(255, 255, 0); for (int i=0; i<54; i++) { rect(65+11*i, 350-10*his6[i], 9, 10*his6[i]); } } cb1.setVisible(false); cb2.setVisible(false); cb3.setVisible(true); cb4.setVisible(true); cb5.setVisible(true); cb6.setVisible(true); }