Graphiques de base avec Matplotlib

Python intermédiaire

Hugo Bowne-Anderson

Data Scientist at DataCamp

Graphiques de base avec Matplotlib

  • Visualisation

icône d'histogramme

  • Structure des données

icône de code

  • Structures de contrôle

  • Étude de cas

Python intermédiaire

Visualisation de données

  • Indispensable en analyse de données

    • Explorer les données
    • Présenter les constats

Python intermédiaire

1 Source : GapMinder, Wealth and Health of Nations
Python intermédiaire

1 Source : GapMinder, Wealth and Health of Nations
Python intermédiaire

1 Source : GapMinder, Wealth and Health of Nations
Python intermédiaire

Matplotlib

import matplotlib.pyplot as plt

year = [1950, 1970, 1990, 2010]
pop = [2.519, 3.692, 5.263, 6.972]
plt.plot(year, pop)
plt.show()

Python intermédiaire

Matplotlib

Python intermédiaire

Matplotlib

Python intermédiaire

Nuage de points

import matplotlib.pyplot as plt
year = [1950, 1970, 1990, 2010]
pop = [2.519, 3.692, 5.263, 6.972]
plt.plot(year, pop)
plt.show()
Python intermédiaire

Nuage de points

import matplotlib.pyplot as plt
year = [1950, 1970, 1990, 2010]
pop = [2.519, 3.692, 5.263, 6.972]
plt.scatter(year, pop)
plt.show()

Python intermédiaire

Passons à la pratique !

Python intermédiaire

Preparing Video For Download...