diff --git a/module2/exo1/toy_document_orgmode_R_fr.org b/module2/exo1/toy_document_orgmode_R_fr.org
index 54b333e1b1063ba79bf5c907dbfaae6765224ee7..419bb392d3f667a2bbf4b707965e2bb297afaf4c 100644
--- a/module2/exo1/toy_document_orgmode_R_fr.org
+++ b/module2/exo1/toy_document_orgmode_R_fr.org
@@ -1,8 +1,6 @@
-#+TITLE: À propos du calcul de \pi
+#+TITLE: À propos du calcul de $\pi$
#+LANGUAGE: fr
-#+AUTHOR: Arnaud Legrand
-#+DATE: 2018-09-19 mer. 21:51
-# #+PROPERTY: header-args :eval never-export
+# #+PROPERTY: header-args :session :exports both
#+HTML_HEAD:
#+HTML_HEAD:
@@ -13,7 +11,7 @@
* En demandant à la lib maths
-Mon ordinateur m’indique que \pi vaut /approximativement/
+Mon ordinateur m’indique que $\pi$ vaut /approximativement/
#+begin_src R :results output :exports both
pi
@@ -34,23 +32,26 @@ theta = pi/2*runif(N)
* Avec un argument "fréquentiel" de surface
Sinon, une méthode plus simple à comprendre et ne faisant pas intervenir d'appel
-à la fonction sinus se base sur le fait que si \[ X ~ U(0,1) ]\ et \[Y~U(0,1)]\ alors
-\[P[X^2 + Y^2 \inf 1] % \pi /4 ]\ (voir [[https://fr.wikipedia.org/wiki/M%C3%A9thode_de_Monte-Carlo#D%C3%A9termination_de_la_valeur_de_%CF%80][méthode de Monte Carlo sur Wikipedia]]). Le code
+à la fonction sinus se base sur le fait que si $X\sim U(0,1)$ et $Y\sim U(0,1)$ alors
+$P[X^2 + Y^2 \leq 1] % \pi/4$ (voir [[https://fr.wikipedia.org/wiki/M%C3%A9thode_de_Monte-Carlo#D%C3%A9termination_de_la_valeur_de_%CF%80][méthode de Monte Carlo sur Wikipedia]]). Le code
suivant illustre ce fait :
-#+begin_src R :results output graphics :exports both :width 600 :height 400 :session *R*
+#+begin_src R :results output graphics :file example.png :exports both :width 600 :height 400 :session *R*
set.seed(42)
N = 1000
df = data.frame(X = runif(N), Y = runif(N))
df$Accept = (df$X**2 <=1=
library(ggplot2)
-ggplot(df, aes(x=X,y=Y, color=Accept)) + geom_point(alpha=.2) + coold_fixed() + theme_bw()
+ggplot(df, aes(x=X,y=Y, color=Accept)) + geom_point(alpha=.2) + coord_fixed() + theme_bw()
#+end_src
-Il est alors aisé d'obtenir une approximation (pas terrible) de \pi en comptant combien de fois, en moyenne, \[X^2 + Y^2]\ est inférieur à 1 :
+Il est alors aisé d'obtenir une approximation (pas terrible) de $\pi$ en comptant combien de fois, en moyenne, $X^2 + Y^2$ est inférieur à 1 :
#+begin_src R :results output :session *R* :exports both
4*mean(df$Accept)
#+end_src
+
+#+AUTHOR: Arnaud Legrand
+#+DATE: 2018-09-19 mer. 21:51