Update toy_document_orgmode_python_fr.org

parent d72c0a95
......@@ -51,7 +51,7 @@ theta = np.random.uniform(size=N, low=0, high=pi/2)
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 ≤ 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 python :results output file :session :var matplot_lib_filename="./exe.png" :exports results
#+begin_src python :results silent :session :var matplot_lib_filename="./exe.png" :exports results
import matplotlib.pyplot as plt
import numpy as np
......@@ -70,15 +70,8 @@ ax.scatter(x[reject], y[reject], c='r', alpha=0.2, edgecolor=None)
ax.set_aspect('equal')
plt.savefig(matplot_lib_filename)
print(matplot_lib_filename)
#+end_src
#+RESULTS:
[[file:
>>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> <matplotlib.collections.PathCollection object at 0x7f5c70f6a410>
<matplotlib.collections.PathCollection object at 0x7f5c70f6a950>
./exe.png]]
[[file:./exe.png]]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment