Day 20 of 30Real Python & Data
📊Visualizing Data
🎯 Today's objective
Turn numbers into charts to find patterns.
📖 Key concepts
- matplotlib.pyplot for charts
- plt.plot / .bar / .scatter / .hist
- Always label axes & title
- Charts reveal trends & outliers
💻 Try this code
import matplotlib.pyplot as plt
days = [1,2,3,4,5]
score = [60, 68, 75, 80, 88]
plt.plot(days, score, marker="o")
plt.title("Progress"); plt.xlabel("Day"); plt.ylabel("Score")
plt.show()👥 Learn it your way
🧒 Young Explorers
A chart tells a story your eyes understand instantly. Make your data talk!
Your task
Plot your (made-up) screen-time over a week as a bar chart with labels.
💼 Professionals
Pick the right chart for the question; histograms for distributions, scatter for relationships.
Your task
Scatter-plot two columns of a dataset and describe the relationship you see.
🤖 AI connection
Before modelling, data scientists VISUALISE to spot patterns, outliers and bias. A model can only be as good as the data you understood first.
✅ Quick check
Which chart shows a relationship between two variables?
A scatter plot.
What should every chart have?
A title and labelled axes.