From 7fd803506b9d1d99c4fa7c9af9df06d1f4d3d95d Mon Sep 17 00:00:00 2001 From: 12a5a79214b1354e349468ed6346f605 <12a5a79214b1354e349468ed6346f605@app-learninglab.inria.fr> Date: Thu, 12 Jun 2025 09:50:38 +0000 Subject: [PATCH] Update Readme.md --- journal/Readme.md | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/journal/Readme.md b/journal/Readme.md index 45f2071..6efd67e 100644 --- a/journal/Readme.md +++ b/journal/Readme.md @@ -27,7 +27,7 @@ | Export HTML/PDF par nbconvert | Export HTML/PDF/Word via Pandoc | Export LaTeX/Beamer/HTML, styles personnalisés | -### Module2 Exo2 +### Module2 Exo2 Exo3 ```python import numpy as np @@ -45,4 +45,24 @@ print("Moyenne :", np.mean(donnees)) print("Écart-type :", np.std(donnees, ddof=1)) print("Minimum :", np.min(donnees)) print("Médiane :", np.median(donnees)) -print("Maximum :", np.max(donnees)) \ No newline at end of file +print("Maximum :", np.max(donnees)) + +import matplotlib.pyplot as plt + +# Affichage graphique : Séquence plot + histogramme +fig, axs = plt.subplots(2, 1, figsize=(10, 8)) + +# Séquence plot +axs[0].plot(donnees, marker='o', linestyle='-', color='blue') +axs[0].set_title("Séquence plot des données") +axs[0].set_xlabel("Index") +axs[0].set_ylabel("Valeur") + +# Histogramme +axs[1].hist(donnees, bins=15, color='skyblue', edgecolor='black') +axs[1].set_title("Histogramme des données") +axs[1].set_xlabel("Valeur") +axs[1].set_ylabel("Fréquence") + +plt.tight_layout() +plt.show() \ No newline at end of file -- 2.18.1