From 19b146da0a2f45ce5febb66a4c16bb5d253f3a6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20MARQUET?= Date: Wed, 18 Dec 2024 11:05:46 +0100 Subject: [PATCH] fix(plot type): correct the plot type in the rectangle method - Changed the plot type from "list" to "l" for the rectangle method graph. --- TD1/Exercice51.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TD1/Exercice51.R b/TD1/Exercice51.R index 09f4198..385e98e 100644 --- a/TD1/Exercice51.R +++ b/TD1/Exercice51.R @@ -30,7 +30,7 @@ y_vals <- f(x_vals) integrale_rect <- sum(y_vals * dx) print(integrale_rect) -plot(x_vals, y_vals, type = "list", col = "blue", lwd = 2, +plot(x_vals, y_vals, type = "l", col = "blue", lwd = 2, main = "Methode des rectangles pour l'integrale", xlab = "x", ylab = "f(x)") rect(x_vals[-n], 0, x_vals[-1], y_vals[-n], col = rgb(0, 0, 1, 0.2), border = NA) \ No newline at end of file