Δημιουργία διαγράμματος καταγραφής των εκπομπών CO2 για την Ελλάδα (χρήση Processing)
1960 = 9405.855
1970 = 24165.53
1980 = 51429.675
1990 = 74278.752
2000 = 91616.328
2010 = 86717.216
Το δεδομένα συλλέχτηκαν από το excel αρχείο: https://docs.google.com/spreadsheets/d/1OQBv7dWdgYEv9BggeYmIHvzB710aiBermAPxUa4Fn78/edit#gid=655665408 και επεξεργάστηκαν μέσω του Processing για την δημιουργία του συγκεκριμένου διαγράμματος.
Κώδικας στο Processing:
size(900, 900);
background(0,100,100);
stroke(255);
line(80, 80, 80, 770);
line(60, 750, 750, 750);
text("X = Year",390,40);
text("Y = Emmissions",390,60);
pushStyle();
fill(#FF7F50);
stroke(#FF7F50);
ellipse(200,45,10,10);
popStyle();
text("Greece",215,50);
text("X",63,770);
text("Y",50,751);
// Set the dashes on the biplot that correspond to the X values
text("|",150,754);
text("|",250,754);
text("|",350,754);
text("|",450,754);
text("|",550,754);
text("|",650,754);
// Set the dashes on the biplot that correspond to the Y values
text("_",77,100);
text("_",77,150);
text("_",77,200);
text("_",77,250);
text("_",77,300);
text("_",77,350);
text("_",77,400);
text("_",77,450);
text("_",77,500);
text("_",77,550);
text("_",77,600);
text("_",77,650);
text("_",77,700);
//Set the 2 arrows at the end of the line
text(">",750,754);
text("^",77,83);
// Set the X values (year)
text("1960",130,770);
text("1970",230,770);
text("1980",330,770);
text("1990",430,770);
text("2000",530,770);
text("2010",630,770);
// Set the Y values
text("120.000.000",0,156);
text("10.000.000",0,206);
text("100.000.000",0,256);
text("90.000.000",4,306);
text("80.000.000",4,356);
text("70.000.000",4,406);
text("60.000.000",4,456);
text("50.000.000",4,506);
text("40.000.000",4,556);
text("30.000.000",4,606);
text("20.000.000",4,656);
text("10.000.000",4,706);
pushStyle();
fill(#FF7F50);
stroke(#FF7F50);
ellipse(153,710,10,10);
popStyle();
pushStyle();
fill(#FF7F50);
stroke(#FF7F50);
ellipse(253,634,10,10);
popStyle();
pushStyle();
fill(#FF7F50);
stroke(#FF7F50);
ellipse(353,496,10,10);
popStyle();
pushStyle();
fill(#FF7F50);
stroke(#FF7F50);
ellipse(453,381,10,10);
popStyle();
pushStyle();
fill(#FF7F50);
stroke(#FF7F50);
ellipse(553,298,10,10);
popStyle();
pushStyle();
fill(#FF7F50);
stroke(#FF7F50);
ellipse(653,324,10,10);
popStyle();
Comments
Post a Comment