diff --git a/module2/exo1/toy_document_fr.Rmd b/module2/exo1/toy_document_fr.Rmd index 49d651db6941312f35d351751c9b1bbc20cc4bc1..582e8b8232711210edf86817d3a8f00359c62ec1 100644 --- a/module2/exo1/toy_document_fr.Rmd +++ b/module2/exo1/toy_document_fr.Rmd @@ -27,4 +27,17 @@ x = runif(N) theta = pi/2*runif(N) R=2/(mean(x+sin(theta)>1)) plot=R +library(ggplot2) +ggplot(R) ``` +>ggplot ne fonctionne pas problème avec FORTITUDE? + +```{r} +set.seed(42) +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() +``` +>Ce code fonctionne.. \ No newline at end of file