Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
| python:matplotlib [2023/07/20 10:47] – [Labels des axes] add yticks phsw | python:matplotlib [2024/10/06 15:47] (Version actuelle) – [Matplotlib] add link phsw | ||
|---|---|---|---|
| Ligne 2: | Ligne 2: | ||
| * [[https:// | * [[https:// | ||
| + | * [[https:// | ||
| + | * https:// | ||
| + | |||
| Ligne 315: | Ligne 318: | ||
| for tick in ax.get_xticklabels(): | for tick in ax.get_xticklabels(): | ||
| tick.set_rotation(45) | tick.set_rotation(45) | ||
| + | | ||
| + | # or (with Matplotlib >= 3.5): | ||
| + | ax.set_xticks(ax.get_xticks(), | ||
| # Pad margins so that markers don't get clipped by the axes | # Pad margins so that markers don't get clipped by the axes | ||
| Ligne 575: | Ligne 581: | ||
| </ | </ | ||
| + | |||
| + | |||
| + | === Boxplots === | ||
| + | |||
| + | Pour que Matplotlib calcule directement les statistiques : '' | ||
| + | |||
| + | Pour fournir nous-mêmes les statistiques à Matplotlib : '' | ||
| + | |||
| + | |||
| + | == Changer la couleur de fond == | ||
| + | |||
| + | [[https:// | ||
| + | |||
| + | <code python> | ||
| + | boxplot = ax1.boxplot(all_data, | ||
| + | for b in boxplot[' | ||
| + | b.set_facecolor(color) | ||
| + | </ | ||
| + | |||
| + | == Légende correspondante == | ||
| + | |||
| + | [[https:// | ||
| + | |||
| + | <code python> | ||
| + | boxplot = ax.boxplot(all_data, | ||
| + | ax.legend([boxplot[" | ||
| + | </ | ||