You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/cours/dataviz.qmd
+62-1Lines changed: 62 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -368,4 +368,65 @@ plt.tight_layout()
368
368
plt.show()
369
369
```
370
370
371
-
---
371
+
---
372
+
373
+
374
+
375
+
376
+
## Utilisation de plt.subplots()
377
+
378
+
La fonction `plt.subplots()` crée à la fois une figure et un tableau d’axes (`fig, axes`), ce qui permet de gérer plusieurs subplots plus facilement que `plt.subplot()`. Elle retourne :
379
+
-`fig` : la figure globale.
380
+
-`axes` : une liste ou un tableau d'objets `AxesSubplot`, facilitant la manipulation des sous-graphiques.
381
+
382
+
### Exemple : Grille 2×2 de graphiques
383
+
384
+
Dans cet exemple, nous allons tracer quatre graphiques dans une grille de 2 lignes et 2 colonnes.
0 commit comments