Basic plots with Matplotlib

Python - Livello Intermedio

Hugo Bowne-Anderson

Data Scientist at DataCamp

Basic plots with Matplotlib

  • Visualization

bar chart icon

  • Data Structure

code icon

  • Control Structures

  • Case Study

Python - Livello Intermedio

Data visualization

  • Very important in Data Analysis

    • Explore data
    • Report insights

Python - Livello Intermedio

1 Source: GapMinder, Wealth and Health of Nations
Python - Livello Intermedio

1 Source: GapMinder, Wealth and Health of Nations
Python - Livello Intermedio

1 Source: GapMinder, Wealth and Health of Nations
Python - Livello Intermedio

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 - Livello Intermedio

Matplotlib

Python - Livello Intermedio

Matplotlib

Python - Livello Intermedio

Scatter plot

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 - Livello Intermedio

Scatter plot

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 - Livello Intermedio

Let's practice!

Python - Livello Intermedio

Preparing Video For Download...