2023-05-20 17:43:02 +02:00
|
|
|
data = csvRead("data.csv");
|
2023-05-18 19:13:24 +02:00
|
|
|
|
|
|
|
surfaceAfrique = sum(data(1:57, 2)* 1000);
|
|
|
|
populationAfrique = sum(data(1:57, 3)* 1000000);
|
|
|
|
|
|
|
|
surfaceAmeriqueDuNord = sum(data(58:86, 2)* 1000);
|
|
|
|
populationAmeriqueDuNord = sum(data(58:86, 3)* 1000000);
|
|
|
|
|
|
|
|
surfaceAmeriqueDuSud = sum(data(87:99, 2)* 1000);
|
|
|
|
populationAmeriqueDuSud = sum(data(87:99, 3)* 1000000);
|
|
|
|
|
|
|
|
surfaceAsie = sum(data(100:150, 2)* 1000);
|
|
|
|
populationAsie = sum(data(100:150, 3)* 1000000);
|
|
|
|
|
|
|
|
surfaceEurope = sum(data(151:193, 2)* 1000);
|
|
|
|
populationEurope = sum(data(151:193, 3)* 1000000);
|
|
|
|
|
|
|
|
surfaceOceanie = sum(data(194:207, 2)* 1000);
|
|
|
|
populationOceanie = sum(data(194:207, 3)* 1000000);
|
|
|
|
|
|
|
|
pie([surfaceAfrique, surfaceAmeriqueDuNord, surfaceAmeriqueDuSud, surfaceAsie, surfaceEurope, surfaceOceanie]);
|
|
|
|
title("Répartition de la surface terrestre");
|
|
|
|
legend(["Afrique", "Amérique du Nord", "Amérique du Sud", "Asie", "Europe", "Océanie"], 'out_upper_right');
|
2023-05-20 17:43:02 +02:00
|
|
|
xs2png(0,"ex1/img/ex1-4-1.png");
|
2023-05-18 19:13:24 +02:00
|
|
|
|
|
|
|
clf();
|
|
|
|
|
|
|
|
pie([populationAfrique, populationAmeriqueDuNord, populationAmeriqueDuSud, populationAsie, populationEurope, populationOceanie]);
|
|
|
|
title("Répartition de la population mondiale");
|
|
|
|
legend(["Afrique", "Amérique du Nord", "Amérique du Sud", "Asie", "Europe", "Océanie"], 'out_upper_right');
|
2023-05-20 17:43:02 +02:00
|
|
|
xs2png(0,"ex1/img/ex1-4-2.png");
|