Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • PYTHON - Atelier MatPlotLib PYTHON - Atelier MatPlotLib
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Terraform modules
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

La forge institutionnelle d'INRAE étant en production depuis le 10 juin 2025, nous vous invitons à y créer vos nouveaux projets.

  • Poulard Christine
  • PYTHON - Atelier MatPlotLibPYTHON - Atelier MatPlotLib
  • Wiki
  • focus seaborn

focus seaborn · Changes

Page history
Update focus seaborn authored Mar 07, 2022 by Poulard Christine's avatar Poulard Christine
Show whitespace changes
Inline Side-by-side
focus-seaborn.md
View page @ 3ca8f84e
......@@ -29,11 +29,18 @@ On rappelle qu'il existe d'autres styles : `'dark_background', 'fast', 'fivethir
## Figures simples à partir de données stockées dans des pandas DataFrame
On passe le nom de la DataFrame en argument (mot-clef "data"), et ensuite il suffit de donner les **noms** des colonnes pour x et y.
Seaborn crée un ax et le renvoie, si on veut ajouter des éléments dessus il fait donc le nommer lors de l'appel à la méthode de tracé (
<details><summary>l'explication en anglais (adapté du MOOC Scikit-lean)</summary>
The function scatterplot from seaborn takes as input the full dataframe and the parameter x and y allows to specify the names of the columns to be plotted. Note that this function returns a matplotlib axis (named ax in the example above) that can be further used to add elements on the same matplotlib axis (such as a title).
</details>
``` python
import seaborn as sns
ax = sns.scatterplot(data=mon_data_frame, x=nom_colonne_x, y=nom_colonne_y, color="black", alpha=0.5)
ax.set_title("Flipper length in function of the body mass")
ax.set_title("Mon titre sur l'objet ax retourné par seaborn")
# est-ce qu'il faut un "plt.show()" ??
```
......
Clone repository
  • AtelierB1_Graphiques_simples
  • AtelierB2_Lire_un_fichier
  • AtelierC
  • Atelier_D_carte
  • Atelier_D_carte_a_partir_de_fichiers_binaires
  • Atelier_E_longues_series
  • Atelier_G_widgets
  • Atelier_clic_afficher
  • Atelier_clics
  • Cartes focus sur le redimensionnement
  • GUI avec QT
  • La doc avec Sphinx
  • Lexique
  • Point Théorie Subplots
  • Pour les contributeurs
View All Pages