Skip to content

3.4.1 Visualization Roadmap: Choose the Chart Before the Style

Visualization is not decoration. It turns an analysis result into something another person can understand quickly.

Data Visualization Roadmap

Use this decision first:

What you want to showStart with
change over timeline chart
category comparisonbar chart
distributionhistogram or box plot
relationship between two numbersscatter plot
correlation matrixheatmap

After the chart type is right, then polish title, axes, legend, colors, and annotation.

Create visual_first_loop.py and run it after installing pandas and matplotlib.

import pandas as pd
import matplotlib.pyplot as plt
sales = pd.DataFrame(
{
"month": ["2026-01", "2026-02", "2026-03", "2026-04"],
"amount": [120, 180, 160, 220],
}
)
ax = sales.plot(x="month", y="amount", marker="o", legend=False)
ax.set_title("Monthly sales")
ax.set_xlabel("Month")
ax.set_ylabel("Amount")
plt.tight_layout()
plt.savefig("sales_trend.png", dpi=150)
print("saved: sales_trend.png")

Expected output:

Terminal window
saved: sales_trend.png

Open the image and check one thing: can a reader see the trend within three seconds?

OrderReadWhat to practice
13.4.2 Matplotlib BasicsFigure, Axes, line/bar/scatter
23.4.3 Seaborn Statistical Visualizationfaster exploratory charts
33.4.5 Visualization Best Practiceschart choice, labels, color, misleading charts
43.4.4 Plotly Interactive Visualizationinteractive charts when the project needs them

Keep this page’s proof of learning as a small evidence card:

Question
what comparison, distribution, trend, or relationship the chart answers
Chart Choice
line, bar, scatter, histogram, box, heatmap, or interactive dashboard
Artifact
saved chart image/html plus the data slice used
Failure Check
misleading scale, overloaded chart, wrong aggregation, or missing labels
Expected Output
chart artifact with one sentence explaining the insight

You pass this subchapter when you can create 4 useful charts from one dataset and explain why each chart type was chosen.

Check reasoning and explanation
  1. A passing answer starts from the question, identifies the table/DataFrame or query needed, and keeps the cleaning step reproducible.
  2. The evidence should include a small output sample, a plot or SQL result when relevant, and one sentence interpreting what changed.
  3. A good self-check names one data-quality risk such as missing values, duplicate rows, wrong joins, misleading aggregation, or an unreadable chart.