From 0040e06aa91373f1b16c6d971c70cc0252decfe3 Mon Sep 17 00:00:00 2001 From: 23be481b3dae757d4aaf1e5004d7ac03 <23be481b3dae757d4aaf1e5004d7ac03@app-learninglab.inria.fr> Date: Mon, 20 Apr 2020 18:14:07 +0000 Subject: [PATCH] Update Lynda-markdown.md --- module2/module2/exo1/Lynda-markdown.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module2/module2/exo1/Lynda-markdown.md b/module2/module2/exo1/Lynda-markdown.md index 4e5b8c1..ca11064 100644 --- a/module2/module2/exo1/Lynda-markdown.md +++ b/module2/module2/exo1/Lynda-markdown.md @@ -36,7 +36,7 @@ N = 1000 df = data.frame(X = runif(N), Y = runif(N)) df$Accept = (df$X**2 + df$Y**2 <=1) library(ggplot2) -ggplot(df, aes(x=X,y=Y,color=Accept)) + geom_point(alpha=.2) + coord_fixed() + theme_bw() +ggplot(df, aes(x=X,y=Y,color=Accept)) + geom_point(alpha=.2 ) + coord_fixed() + theme_bw() ``` Il est alors aisé d’obtenir une approximation (pas terrible) de π en comptant combien de fois, en moyenne, X2+Y2 est inférieur à 1: -- 2.18.1