size(400, 400); strokeWeight(1); strokeCap(PROJECT); line(40, 360, 300, 360); line(40, 360, 40, 20); strokeCap(ROUND); int barwidth = 20; int gap = 10; for (int x = 1; x < 9; x = x+1) { strokeWeight(9-x); fill(255-25*x,0,25*x); rect((barwidth+gap)*x+2*gap,40*x,barwidth,360-40*x); text(str(x), 30*x+barwidth+5, 380); } strokeCap(SQUARE); strokeWeight(1); fill(0); text("Decreasing Bars", 130, 30); text("freq", 1, 180); text("number", 160, 390); for (int x = 1; x < 10; x = x+1) { line(40, 400-40*x, 30, 400-40*x); text(str(9-x), 20, 40*x); } save("activity4.png");