Module 10 — Data Visualization with Matplotlib#

Graduate MSBA Module Overview

Analysis without communication is incomplete. A DataFrame of aggregated customer data, a table of revenue by region, and a summary of purchase trends are useful to the analyst who built them — but they are not yet useful to the business leader who needs to act on them. Data visualization bridges that gap.

Matplotlib is Python’s foundational visualization library, and understanding how to create clear, informative charts is an essential analytics skill:

  • Bar charts — compare values across categories
  • Line charts — show trends over time
  • Scatter plots — reveal relationships between variables

Visualization also closes the loop on the four core programming principles. You use iteration to generate multiple charts. You use inference to choose which visualization best answers the analytical question. You use abstraction to work with Figure and Axes objects. You use polymorphism to apply similar plotting methods to different data structures.


Quick Code Example#

import matplotlib.pyplot as plt
import pandas as pd

data = {
    'region': ['Northwest', 'Southwest', 'Southeast', 'Northeast'],
    'total_revenue': [48250.75, 36890.50, 22140.25, 41600.00],
    'customer_count': [85, 62, 41, 73]
}

df = pd.DataFrame(data)

fig, axes = plt.subplots(1, 2, figsize=(12, 5))

axes[0].bar(df['region'], df['total_revenue'], color='steelblue')
axes[0].set_title('Total Revenue by Region')
axes[0].set_xlabel('Region')
axes[0].set_ylabel('Revenue ($)')
axes[0].tick_params(axis='x', rotation=15)

axes[1].bar(df['region'], df['customer_count'], color='coral')
axes[1].set_title('Customer Count by Region')
axes[1].set_xlabel('Region')
axes[1].set_ylabel('Customers')
axes[1].tick_params(axis='x', rotation=15)

plt.tight_layout()
plt.show()

Expected Output: A two-panel bar chart visualization showing total revenue by region and customer count by region.


Learning Progression#

PlatformLearning Focus
NotebookLMExplore visualization through business storytelling that shows how chart selection and design choices affect how data is understood
Google ColabCreate bar charts, line charts, and scatter plots from business datasets using Matplotlib
ZybooksBuild fluency with visualization syntax, chart customization, and interpretation through structured practice

Module Pages#

  • Concept → — Deep narrative on visualization strategy and chart selection
  • Advanced → — Extended code with multiple chart types, subplots, and styling
  • Notebook → — Jupyter notebook lab description