Grundläggande diagram med Matplotlib

Intermediate Python

Hugo Bowne-Anderson

Data Scientist at DataCamp

Grundläggande diagram med Matplotlib

  • Visualisering

ikon för stapeldiagram

  • Datastruktur

kodikon

  • Kontrollstrukturer

  • Fallstudie

Intermediate Python

Datavisualisering

  • Mycket viktigt inom dataanalys

    • Utforska data
    • Presentera insikter

Intermediate Python

1 Källa: GapMinder, Wealth and Health of Nations
Intermediate Python

1 Källa: GapMinder, Wealth and Health of Nations
Intermediate Python

1 Källa: GapMinder, Wealth and Health of Nations
Intermediate Python

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()

Intermediate Python

Matplotlib

Intermediate Python

Matplotlib

Intermediate Python

Spridningsdiagram

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()
Intermediate Python

Spridningsdiagram

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()

Intermediate Python

Nu kör vi en övning!

Intermediate Python

Preparing Video For Download...