So this is the graph im making.
I have value acording to each hour of the day and colors represent each month. here is the code. Lets say i want to average the value of each month and graph how they are changing. Should i ask in my if statement to add all the value and then divide by the lenght of the rows?
size(2880,400);
background(0);
float w=0;
float h=0;
Table table = loadTable("indice_2018.CSV","header");
//Table row = new Table();
for(int i = 0; i<2880; i++){
w = w + .6;
h= h+ 14.4;
String date = table.getString(i,"Fecha");
String d = date.substring(0,2);
String m = date.substring(3,5);
String a = date.substring(6,10);
//if ( d == "01"){
int x= table.getInt(i,"Hora");
int y = table.getInt(i,"Centro PM10");
noStroke();
rect(w,y+200,2,2);
if(m.equals("01")){
fill(#FAFF00);
}else if(m.equals("02")) {
fill(#00FF63);
}else if(m.equals("03")) {
fill(#008AFF);
}else if(m.equals("04")) {
fill(#FF002F);
}else{
}
}