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");
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}