Update exercice_python_fr.org

parent c7622005
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
Telechargement des données localement si elle n'existent pas deja. Telechargement des données localement si elle n'existent pas deja.
Address ou trouver les donnees : Addresse ou trouver les donnees :
#+NAME: url_emacs #+NAME: url_emacs
- https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_confirmed_global.csv - https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_confirmed_global.csv
...@@ -87,20 +87,40 @@ Nom du plot lineaire : ...@@ -87,20 +87,40 @@ Nom du plot lineaire :
#+NAME: plot_linear_emacs #+NAME: plot_linear_emacs
- plot-linear.png - plot-linear.png
#+begin_src python :results silent :session :export both :var plot_linear=plot_linear_emacs #+begin_src python :results output :session :export both :var plot_linear=plot_linear_emacs
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
for i in range(len(df)): for i in range(len(df)):
df.iloc[i]["1/22/20":].plot() df.iloc[i]["1/22/20":].plot()
df.at[1,"Country/Region"] = "China, Hong Kong"
plt.legend(df["Country/Region"]) plt.legend(df["Country/Region"])
plt.yscale("linear") plt.yscale("linear")
plt.savefig(plot_linear[0]) plt.savefig(plot_linear[0])
#+end_src #+end_src
[[file:plot-linear.png]] #+RESULTS:
#+begin_example
>>> >>> ... ... <matplotlib.axes._subplots.AxesSubplot object at 0x7f66c1db9f10>
<matplotlib.axes._subplots.AxesSubplot object at 0x7f66c1db9f10>
<matplotlib.axes._subplots.AxesSubplot object at 0x7f66c1db9f10>
<matplotlib.axes._subplots.AxesSubplot object at 0x7f66c1db9f10>
<matplotlib.axes._subplots.AxesSubplot object at 0x7f66c1db9f10>
<matplotlib.axes._subplots.AxesSubplot object at 0x7f66c1db9f10>
<matplotlib.axes._subplots.AxesSubplot object at 0x7f66c1db9f10>
<matplotlib.axes._subplots.AxesSubplot object at 0x7f66c1db9f10>
<matplotlib.axes._subplots.AxesSubplot object at 0x7f66c1db9f10>
<matplotlib.axes._subplots.AxesSubplot object at 0x7f66c1db9f10>
<matplotlib.axes._subplots.AxesSubplot object at 0x7f66c1db9f10>
<matplotlib.axes._subplots.AxesSubplot object at 0x7f66c1db9f10>
<matplotlib.axes._subplots.AxesSubplot object at 0x7f66c1db9f10>
<matplotlib.axes._subplots.AxesSubplot object at 0x7f66c1db9f10>
<matplotlib.legend.Legend object at 0x7f66c1cb0cd0>
#+end_example
[[file:plot-linear.png]]
** Affichage des donnees (echelle logarithmique) ** Affichage des donnees (echelle logarithmique)
......
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