Advanced data visualization, storytelling & business intelligence with Matplotlib & Seaborn
| Field | Detail |
|---|---|
| Course | Python Data Visualization Masterclass: Matplotlib & Seaborn |
| Instructor | Chris Bruehl β Lead Python Instructor, Maven Analytics |
| Platform | Udemy |
| Duration | 7.5 hours Β· 94 lectures |
| Projects | 3 real-world case studies + comprehensive visualization exercises |
| Part of | ml-engineering-bootcamp β Data Analysis Stack |
| Prerequisites | Pandas_Bootcamp OR solid understanding of NumPy/Pandas |
By the end of this course, you'll be able to:
- β Master Matplotlib's object-oriented API for building publication-quality visualizations
- β Design and customize 20+ chart types: line, bar, scatter, histogram, box, violin, heatmap, etc.
- β Apply advanced formatting techniques: subplots, GridSpec, style sheets, color palettes
- β Build statistical visualizations with Seaborn: pair plots, joint plots, facet grids
- β Implement best practices for data storytelling, visual design, and communication
- β Create professional reports combining multiple charts and insights
- β Use color theory and design principles to communicate data effectively
| Library | Topics |
|---|---|
| Matplotlib | Figure/Axes architecture Β· Line charts Β· Bar charts Β· Scatter plots Β· Histograms Β· Pie/Donut charts Β· Subplots Β· GridSpec Β· Style sheets Β· Advanced formatting Β· Color customization |
| Seaborn | Categorical plots Β· Distribution plots Β· Box & violin plots Β· Pair plots Β· Joint plots Β· Heat maps Β· Facet grids Β· Statistical estimation Β· Color palettes |
| Visualization Best Practices | Chart selection Β· Visual hierarchy Β· Color accessibility Β· Storytelling Β· Report design |
- Data visualization frameworks and libraries
- Best practices for chart selection
- Effective formatting principles
- Visual storytelling fundamentals
- Common visualization errors
- Figure and Axes architecture (the OOP API)
- Building line charts
- Building bar charts
- Building scatter plots
- Building histograms
- Building pie & donut charts
- Common chart customization techniques
- Load and explore coffee market data (CSV)
- Create multi-chart visualizations for volume analysis
- Visualize price trends by country and region
- Communicate key insights with Matplotlib
- Deliverable: Comprehensive coffee market analysis notebook
| Project Details | |
|---|---|
| Dataset | Global coffee trader data Β· Volume & price by country |
| Skills Applied | Data loading Β· Exploratory visualization Β· Matplotlib customization |
| Notebook | project-1-coffee-market.ipynb |
| Status | β³ Pending |
- Multi-chart figure layouts
- Subplots and figure-level control
- GridSpec for complex layouts
- Custom colors and color palettes
- Style sheets and rcParams
- Annotations and text customization
- Saving high-quality figures
- Continue coffee market analysis with advanced techniques
- Build multi-chart report with custom layouts
- Apply professional styling and branding
- Create publication-ready figures
- Deliverable: Polished coffee production report
| Project Details | |
|---|---|
| Dataset | Global coffee production data (continued from Project #1) |
| Skills Applied | Advanced Matplotlib Β· Report design Β· Professional styling |
| Notebook | project-2-coffee-production.ipynb |
| Status | β³ Pending |
- Seaborn fundamentals and integration with Matplotlib
- Categorical plots (stripplot, swarmplot, boxplot, violinplot)
- Distribution plots (histplot, kdeplot, rugplot)
- Bivariate plots (scatterplot with regression)
- Multi-plot grids (FacetGrid, PairGrid, JointGrid)
- Heat maps and correlation matrices
- Color palettes and semantic mapping
- Statistical estimation and confidence intervals
- Load and explore automotive auction dataset
- Conduct exploratory data analysis with Seaborn
- Visualize price distributions, market trends, and vehicle attributes
- Create multi-dimensional comparisons with FacetGrids
- Build heat maps for feature correlations
- Synthesize findings into actionable insights
- Deliverable: Comprehensive used car market analysis
| Project Details | |
|---|---|
| Dataset | Automotive auction data Β· Vehicle specs, pricing, market conditions |
| Skills Applied | Seaborn Β· Statistical visualization Β· Complex multi-chart reports |
| Notebook | project-3-used-cars.ipynb |
| Status | β³ Pending |
This section will be updated as the course progresses. These are working notes on the fundamental mental models for visualization.
| Concept | Description | Notes |
|---|---|---|
| Figure & Axes | Container hierarchy in Matplotlib OOP API | Figure is the top-level container; Axes is where you plot. Always prefer fig, ax = plt.subplots() over plt.plot() |
| Vectorization in Plotting | Plotting large arrays efficiently | NumPy/Matplotlib integration allows pushing rendering into optimized C code |
| Color Mapping | Encoding data dimensions into color | Use colormap for continuous data; categorical palettes for discrete groups |
| Statistical Layers | Layering raw data with aggregations in Seaborn | Seaborn's hue, style, size parameters encode additional dimensions |
| Faceting | Small multiples to show relationships across groups | FacetGrid/PairGrid reveals patterns not visible in single plots |
| Visual Hierarchy | Directing viewer attention intentionally | Size, color saturation, position encode importance |
| Aspect Ratio & Whitespace | Design principles for clarity | Golden ratio (~1.618) often optimal for plots; negative space improves readability |
| Task | Code Pattern |
|---|---|
| Create figure with specific size & DPI | fig, ax = plt.subplots(figsize=(12, 6), dpi=100) |
| Access and modify rcParams globally | plt.rcParams['font.size'] = 12 or plt.rcParams.update({'axes.labelsize': 11}) |
| Build subplots grid | fig, axes = plt.subplots(2, 3, figsize=(15, 10)) |
| Use GridSpec for complex layouts | gs = fig.add_gridspec(3, 3, hspace=0.3, wspace=0.3) then ax = fig.add_subplot(gs[0, :2]) |
| Apply style sheets | plt.style.use('seaborn-v0_8-darkgrid') (check available with plt.style.available) |
| Iterate over subplot axes | for ax in axes.flat: ax.set_xlabel('X Label') |
| Save figure with transparency | fig.savefig('plot.png', dpi=300, bbox_inches='tight', transparent=True) |
| Create Seaborn heatmap | sns.heatmap(corr_matrix, annot=True, cmap='coolwarm', ax=ax) |
| Build FacetGrid | g = sns.FacetGrid(df, col='category', row='region', height=4) then g.map(sns.scatterplot, 'x', 'y') |
| Customize Seaborn palette | sns.set_palette('husl') or pass palette='Set2' to plotting function |
- β Solid understanding of NumPy arrays (indexing, slicing, broadcasting)
- β Competency with Pandas DataFrames (basic filtering, groupby, aggregation)
- β Python basics: functions, loops, conditionals, data types
- β Comfort with Jupyter Notebooks
- Pandas_Bootcamp β Essential for data manipulation skills
- NumPy fundamentals β Covered in Maven's NumPy & Pandas Masterclass
# Create conda environment
conda create -n matplotlib-seaborn python=3.11 jupyter numpy pandas matplotlib seaborn
# Activate
conda activate matplotlib-seaborn
# Install optional packages
pip install scikit-learn # For regression examples in SeabornRole: Data Consultant at Maven Consulting Group
Challenge: Visualize volume and price trends across international markets
Deliverables:
- Multi-chart exploration of coffee market data
- Volume analysis by country and region
- Price trend visualizations
- Matplotlib-driven analysis notebook
Skills Practiced: Data loading Β· Matplotlib chart types Β· Basic customization Β· Exploratory visualization
Role: Senior Data Consultant
Challenge: Create a polished, professional report on coffee production trends
Deliverables:
- Advanced multi-chart layouts with GridSpec
- Custom color schemes and branding
- Publication-ready figure styling
- Comprehensive analysis report
Skills Practiced: Advanced Matplotlib Β· Report design Β· Professional styling Β· Subplot architecture
Role: Analytics Lead for Vehicle Acquisition Team
Challenge: Identify patterns in automotive auction data to inform purchasing decisions
Deliverables:
- Exploratory data analysis with Seaborn
- Price distribution and market trends
- Multi-dimensional comparisons with FacetGrids
- Correlation heat maps and insights
- Actionable recommendations based on visualization
Skills Practiced: Seaborn statistical plots Β· Complex multi-plot layouts Β· Color mapping Β· Visual storytelling
This course is Part 2 of the Data Analysis Stack in the broader ML Engineering Bootcamp:
| Module | Course | Focus | Status |
|---|---|---|---|
| 1. Foundation | Pandas_Bootcamp | Data manipulation, aggregation, reshaping | β Complete |
| 2. Visualization | MatplotSea_Bootcamp | Data visualization, reporting, storytelling | π In Progress |
| 3. Statistics | TBD | Hypothesis testing, distributions, inference | β³ Planned |
| 4. ML Foundations | TBD | Scikit-Learn, model evaluation, pipelines | β³ Planned |
- Matplotlib Official Docs
- Matplotlib Gallery β Hundreds of examples
- Seaborn Official Docs
- Seaborn Gallery β Statistical visualization examples
-
Matplotlib
- Matplotlib for Python Developers by Nicolas P. Rougier (free online)
- Interactive Data Visualization with Matplotlib by Packt
- Chapter 9-10 of Python for Data Analysis by Wes McKinney
-
Seaborn & Statistical Visualization
- Fundamentals of Data Visualization by Claus O. Wilke (free online)
- The Visual Display of Quantitative Information by Edward Tufte (classic)
-
Data Storytelling
- Storytelling with Data by Cole Nussbaumer Knaflic
- The Grammar of Graphics by Leland Wilkinson (foundation theory)
- Real Python β Matplotlib Tutorials
- Real Python β Seaborn Tutorials
- Matplotlib β Style Sheets Reference
Milton R. Valle Lora
Senior Electrical Engineer β ML Engineer in transition
Cochabamba, Bolivia