I need to make a simple bar chart or anything to put in my sketch every time i try to link the data it gives me errors can you help.
PImage img;
Drop[] drops = new Drop[300];
void setup() {
size(900, 900);
background(0);
stroke(255);
img = loadImage("http://" + "www.paperhi.com/thumbnails/detail/20130314/black%20and%20white%20maps%20continents%20time%20zones%20world%20map%20cartography%202560x1600%20wallpaper_www.paperhi.com_38.jpg");
imageMode (CENTER);
for (int i = 0; i < drops.length; i++) {
drops[i] = new Drop();
}
}
void draw() {
background(0);
// Draw the image upper centred of the sketch.
image(img,500,200,1000, 400);
//Change image transparency.
tint(255,127);
for (int i = 0; i < drops.length; i++) {
drops[i].fall();
drops[i].show();
}
}
class Drop {
float x = random(width);
float y = random(-500, -200);
float z = random(0, 20);
float len = map(z, 0, 20, 10, 20);
float yspeed = map(z, 0, 10, 1, 10);
void fall() {
y = y + yspeed;
float grav = map(z, 0, 20, 0, 0.2);
yspeed = yspeed + grav;
if (y > height) {
y = random(-200, -100);
yspeed = map(z, 0, 20, 4, 10);
}
}
void show() {
stroke (127,0,0);
line(x, y, x, y+len);
}
}
I just need any chart like a line graph or anything bar chart to link this data
how can i do this I need to show the Date and the how the deaths increased
please help
Thanks