diff --git a/journal/Readme.md b/journal/Readme.md index f56eb60293dc1edebe2b3660a48b225330a72878..1090bb8be16e37cc8db3d4b2dfff7a1b2e25887a 100644 --- a/journal/Readme.md +++ b/journal/Readme.md @@ -1,9 +1,27 @@ # Journal de bord du Mooc / Mooc's logbook -FR +## Utilisation de Pyhton dans Jupyter -Espace réservé au journal de bord du Mooc +Petit tour de commandes pour utiliser python. La plupart est utilisable hors de jupyter. -EN +### Numpy -Reserved for the Mooc's logbook \ No newline at end of file ++ `import numpy as np` ++ `array = np.array(data_list)` ++ `np.amin(array) np.amax(array) ...` ++ `np.std(array, ddof=1)` pour une estimation "corrigée" de l'écart type empirique + +### Matplotlib + ++ `%matplotlib inline` pour que le plot soit afficher après l'exécution de la cellule ++ `import matplotlib.pyplot as plt` ++ Pyplot s'utilise comme un plot à état ou les différents appelles modifie le dernier plot ++ `plt.plot(data)` pour un linechart ++ `plt.hist(data)` pour un histogramme ++ `plt.plot(data, style...)` après les données d'un plot, on peut modifier l'apparance du plot des données + + `plt.plot(data, color='blue')` + + `plt.hist(data, color='blue', ec='black')` pour faire un histogramme avec les 'bins' délimités noir ++ `plt.axis([xmin, xmax, ymin, ymax])` ++ `plt.xlim([xmin, xmax])` idem avec y ++ `plt.grid(True, linestyle=':')` pour afficher le quadrillage en pointillés ++ `plt.show()` affiche le plot. Sans, il est afficher quand même grace à l'inline, mais il y a un output en plus \ No newline at end of file