An open API service indexing awesome lists of open source software.

https://github.com/satvikpraveen/matplotlibmasterpro

πŸ“· MatplotlibMasterPro is a complete, portfolio-ready project to master data visualization using matplotlib. Includes 16 notebooks, real datasets, exportable plots, custom themes, Streamlit dashboard, and Docker support. Ideal for learners and data professionals.
https://github.com/satvikpraveen/matplotlibmasterpro

charts custom-plots dashboarding data-analysis data-science data-visualization educational-project interactive-visualizations jupyter-notebook matplotlib notebooks open-source plotting portfolio-project python python-utilities reproducible-research subplots time-series-analysis visualization-tools

Last synced: 29 days ago
JSON representation

πŸ“· MatplotlibMasterPro is a complete, portfolio-ready project to master data visualization using matplotlib. Includes 16 notebooks, real datasets, exportable plots, custom themes, Streamlit dashboard, and Docker support. Ideal for learners and data professionals.

Awesome Lists containing this project

README

          

# πŸ“Š MatplotlibMasterPro

[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Python](https://img.shields.io/badge/Python-3.10%2B-darkgreen.svg)](https://www.python.org/)
[![Jupyter Notebooks](https://img.shields.io/badge/Jupyter-Notebook-orange.svg)](https://jupyter.org/)
[![Matplotlib Focused](https://img.shields.io/badge/Matplotlib-100%25-brightgreen.svg)](https://matplotlib.org/)
[![Project Status](https://img.shields.io/badge/Status-Active-success.svg)](#)
[![Open Source](https://img.shields.io/badge/Open%20Source-Yes-critical.svg)](#)
[![Dashboard Ready](https://img.shields.io/badge/Dashboards-Included-blueviolet.svg)](#)
[![Animations](https://img.shields.io/badge/Animations-MP4/GIF-red.svg)](#)
[![Streamlit Compatible](https://img.shields.io/badge/Streamlit-Ready-ff4b4b.svg)](#)
[![Portfolio Project](https://img.shields.io/badge/Use%20Case-Portfolio%20Project-lightgrey.svg)](#)
[![Contributions](https://img.shields.io/badge/Contributions-Welcome-blue.svg)](#)

---

## 🧠 Project Overview

**MatplotlibMasterPro** is a complete, portfolio-grade project designed to **master data visualization using `matplotlib.pyplot`**.
It’s structured to serve both as a:

- πŸ“˜ **Self-paced learning notebook series**
- πŸ’Ό **Professional showcase project**

Whether you’re revisiting fundamentals or creating complex dashboards β€” this project brings it all together in one place.

---

## πŸ“ Project Structure

```bash
MatplotlibMasterPro/
β”œβ”€β”€ notebooks/ # πŸ“š Step-by-step concept notebooks (23 total)
β”œβ”€β”€ scripts/ # 🐍 Production-ready Python scripts
β”œβ”€β”€ examples/ # πŸš€ Quick copy-paste examples
β”œβ”€β”€ tests/ # πŸ§ͺ Unit tests for utilities
β”œβ”€β”€ utils/ # πŸ› οΈ Plotting utility functions
β”‚ β”œβ”€β”€ plot_utils.py # Line, bar, scatter, histogram helpers
β”‚ └── theme_utils.py # Publication-ready themes
β”œβ”€β”€ docs/ # πŸ“– Documentation files
β”‚ β”œβ”€β”€ SETUP.md # Environment setup guide
β”‚ β”œβ”€β”€ TROUBLESHOOTING.md # Common issues and solutions
β”‚ β”œβ”€β”€ RESOURCES.md # Learning materials
β”‚ β”œβ”€β”€ RECOMMENDATIONS.md # Project roadmap
β”‚ β”œβ”€β”€ CONTRIBUTING.md # Contribution guidelines
β”‚ └── CODE_OF_CONDUCT.md # Community standards
β”œβ”€β”€ cheatsheets/ # πŸ“‹ Quick-reference syntax guides
β”œβ”€β”€ datasets/ # πŸ“Š Sample CSV datasets
β”œβ”€β”€ exports/ # πŸ’Ύ Generated plots and dashboards
β”œβ”€β”€ streamlit_app.py # 🌐 Streamlit dashboard viewer
β”œβ”€β”€ activate.sh # ⚑ Quick venv activation script
β”œβ”€β”€ requirements.txt # πŸ“¦ Minimal dependencies
β”œβ”€β”€ requirements_dev.txt # πŸ”§ Full dev environment
└── Dockerfile # 🐳 Dockerized Jupyter environment
```

---

## πŸ“š Notebooks Roadmap

| Notebook | Description |
| ---------------------------- | --------------------------------------------------- |
| `01_line_plot.ipynb` | Basics of `plot()`, labels, legend |
| `02_bar_scatter.ipynb` | Bar charts and scatter plots |
| `03_histogram_pie.ipynb` | Distributions and pie charts |
| `04_subplots_axes.ipynb` | Subplotting and axes control |
| `05_customization.ipynb` | Colors, linestyles, themes |
| `06_advanced_plots.ipynb` | Log plots, heatmaps, fill areas |
| `07_annotations.ipynb` | Labels, arrows, text, highlights |
| `08_images_and_grids.ipynb` | `imshow`, `matshow`, grids |
| `09_interactive.ipynb` | Widgets, sliders, `%matplotlib notebook` |
| `10_export_style.ipynb` | Save figures, DPI, formats, themes |
| `11_animation.ipynb` | Animated plots, FuncAnimation, saving MP4/GIF |
| `12_stats_distribution.ipynb`| Statistical distributions and plots |
| `13_comparative_plots.ipynb` | Grouped bars, stacked areas, side-by-side views |
| `14_colormaps_themes.ipynb` | Colormaps, gradients, diverging schemes |
| `15_timeseries.ipynb` | Time-series: trends, seasonal cycles |
| `16_dashboards.ipynb` | Multi-panel dashboards using `subplots`, `gridspec` |
| `17_3d_plots.ipynb` | 3D scatter, surface, wireframe plots |
| `18_statistical_plots.ipynb` | Box plots, violin plots, swarm plots |
| `19_error_visualization.ipynb`| Error bars, confidence intervals, fill between |
| `20_contour_plots.ipynb` | Contour, contourf, filled contours, heatmaps |
| `21_polar_plots.ipynb` | Polar coordinates, radial plots, circular data |
| `22_composite_plots.ipynb` | Layered plots, twin axes, broken axes |
| `23_inset_zoom.ipynb` | Inset plots, zoomed views, anchored boxes |

---

## ✨ Advanced Visualization Features

This project covers **comprehensive matplotlib capabilities** including:

- οΏ½ **23 Interactive Notebooks** β€” From basics to advanced techniques
- 🐍 **5 Production Scripts** β€” Real-world automation examples
- πŸš€ **5 Quick Examples** β€” Copy-paste ready templates
- πŸ§ͺ **80+ Unit Tests** β€” Professional testing practices
- πŸ“¦ **3D Visualizations** β€” Surface plots, wireframes, 3D scatter plots
- πŸ“Š **Statistical Analysis** β€” Box plots, violin plots, distribution comparisons
- πŸ“‰ **Error Visualization** β€” Error bars, confidence intervals, uncertainty quantification
- πŸ—ΊοΈ **Field Representation** β€” Contour plots, filled contours, heatmaps
- πŸ”΅ **Polar & Circular Data** β€” Radar charts, rose plots, wind roses
- πŸ”„ **Multi-Scale Plots** β€” Twin axes, layered visualizations, broken axes
- πŸ” **Detail Views** β€” Inset plots, zoomed views, magnified regions
- 🎨 **8 Publication Themes** β€” IEEE, academic, colorblind-friendly palettes
- 🎬 **Animations** β€” FuncAnimation, timeline effects, dynamic visualizations
- πŸ“ **Complex Layouts** β€” GridSpec, nested subplots, multi-panel dashboards

---

## πŸ“Έ Sample Visualizations

Here are two dashboards from the project:

![🧩 Gridspec Dashboard](exports/dashboards/sales_dashboard_gridspec.png)
_Advanced layout using `GridSpec` for flexible placement_

![πŸͺŸ Subplots Layout](exports/dashboards/sales_dashboard_subplots_2x2.png)
_Subplots with shared axes and tight layout for cleaner visuals_

## 🎞️ Animated Visualizations

Here are animated visualizations exported from the project:

- 🎬 [`product_revenue_bars.mp4`](exports/product_revenue_bars.mp4)
_Animated bar chart showing revenue distribution by product_

- πŸ“ˆ [`revenue_growth.mp4`](exports/revenue_growth.mp4)
_Revenue growth over time with animated line movement_

- πŸ“Š [`units_revenue_growth.mp4`](exports/units_revenue_growth.mp4)
_Dual-plot animation comparing units sold and revenue growth_

- πŸ”„ [`revenue_vs_units_scatter.mp4`](exports/revenue_vs_units_scatter.mp4)
_Dynamic scatter plot showing correlation over time_

## πŸ§ͺ Datasets Created and Used

| Filename | Description |
| ------------------ | -------------------------------------------- |
| `sales_data.csv` | Monthly product-wise sales and revenue |
| `covid_cases.csv` | Cumulative COVID-19 cases across U.S. states |
| `stock_prices.csv` | OHLC & volume for multiple stock tickers |
| `weather_data.csv` | Daily city-level temperature and humidity |

> All datasets are generated using `pandas` and `numpy`, and stored under [`datasets/`](datasets/).

---

## πŸ› οΈ Utilities

Reusable helper functions to accelerate your matplotlib workflow:

- **[`utils/plot_utils.py`](utils/plot_utils.py)** β€” 20+ functions for common plots (line, bar, scatter, histogram, pie, etc.)
- **[`utils/theme_utils.py`](utils/theme_utils.py)** β€” 8 publication-ready themes (dark, minimal, corporate, IEEE, colorblind-friendly, etc.)

---

## 🐍 Production Scripts

Ready-to-run Python scripts in [`scripts/`](scripts/):

| Script | Description | Command |
|--------|-------------|---------|
| **generate_dashboard.py** | Multi-panel sales dashboard | `python scripts/generate_dashboard.py` |
| **generate_3d_plots.py** | Batch 3D visualizations | `python scripts/generate_3d_plots.py` |
| **generate_statistical_plots.py** | Box/violin plots | `python scripts/generate_statistical_plots.py` |
| **batch_export.py** | Export in PNG/PDF/SVG | `python scripts/batch_export.py` |
| **create_publication_figures.py** | IEEE/academic figures | `python scripts/create_publication_figures.py` |

**Use Cases:** Automated reporting, batch processing, production pipelines

---

## πŸš€ Quick Examples

Minimal, copy-paste ready scripts in [`examples/`](examples/):

| Example | Description | Lines of Code |
|---------|-------------|---------------|
| **quick_start.py** | Your first plot | ~10 |
| **publication_figure.py** | Academic paper-ready | ~25 |
| **batch_process.py** | Process multiple CSVs | ~30 |
| **custom_theme_example.py** | Apply themes | ~20 |
| **animation_example.py** | Simple animation | ~18 |

**Use Cases:** Learning, prototyping, templates for projects

---

## πŸ§ͺ Testing

Professional unit tests in [`tests/`](tests/):

- **test_plot_utils.py** β€” Tests for plotting functions (50+ tests)
- **test_theme_utils.py** β€” Tests for theme utilities (30+ tests)

**Run tests:**
```bash
python -m pytest tests/ -v
```

**With coverage:**
```bash
python -m pytest tests/ --cov=utils --cov-report=html
```

---

## 🧾 Cheatsheets

Quick-reference syntax guides available at:

- [`cheatsheets/matplotlib_cheatsheet.md`](cheatsheets/matplotlib_cheatsheet.md)

---

## πŸ“– Documentation & Resources

This project includes comprehensive documentation to support your learning:

- πŸ“‹ **[SETUP.md](docs/SETUP.md)** β€” Complete environment setup guide with activation instructions
- πŸ’‘ **[RECOMMENDATIONS.md](docs/RECOMMENDATIONS.md)** β€” Prioritized improvement suggestions and project roadmap
- πŸ”§ **[TROUBLESHOOTING.md](docs/TROUBLESHOOTING.md)** β€” Solutions for common matplotlib issues (backends, fonts, performance, etc.)
- πŸ“š **[RESOURCES.md](docs/RESOURCES.md)** β€” Curated learning resources (courses, books, communities, datasets)
- 🀝 **[CONTRIBUTING.md](docs/CONTRIBUTING.md)** β€” Contribution guidelines for the project
- πŸ“œ **[CODE_OF_CONDUCT.md](docs/CODE_OF_CONDUCT.md)** β€” Community standards and behavior expectations
- 🐍 **[scripts/README.md](scripts/README.md)** β€” Production scripts documentation
- πŸš€ **[examples/README.md](examples/README.md)** β€” Quick examples documentation
- πŸ§ͺ **[tests/README.md](tests/README.md)** β€” Testing guide and best practices

---

## πŸš€ Getting Started

### **Option 1: Virtual Environment (Recommended)**

1. **Clone the repository:**
```bash
git clone https://github.com/SatvikPraveen/MatplotlibMasterPro.git
cd MatplotlibMasterPro
```

2. **Use the quick activation script:**
```bash
source activate.sh
```

Or activate manually:
```bash
source venv/bin/activate # macOS/Linux
venv\Scripts\activate # Windows
```

3. **Launch JupyterLab:**
```bash
jupyter lab
```

4. **Or run production scripts:**
```bash
python scripts/generate_dashboard.py
python examples/quick_start.py
```

5. **Run tests (optional):**
```bash
python -m pytest tests/ -v
```

πŸ“– **For detailed setup instructions, see [SETUP.md](docs/SETUP.md)**
πŸ’‘ **For improvement suggestions, see [RECOMMENDATIONS.md](docs/RECOMMENDATIONS.md)**
πŸ”§ **For troubleshooting help, see [TROUBLESHOOTING.md](docs/TROUBLESHOOTING.md)**
πŸ“š **For learning resources, see [RESOURCES.md](docs/RESOURCES.md)**

### **Option 2: Docker (Isolated Environment)**

See the [Dockerized Setup](#-dockerized-setup) section below.

---

## 🌐 Streamlit App

Explore exported dashboards interactively:

```bash
streamlit run streamlit_app.py
```

Or via Docker:

```bash
docker build -t matplotlibmasterpro .
docker run -p 8501:8501 matplotlibmasterpro
```

---

## 🐳 Dockerized Setup

Run a fully isolated Jupyter + Streamlit environment with ease.

```bash
# Build the container
docker build -t matplotlibmasterpro .

# Launch Jupyter
docker run -p 8888:8888 matplotlibmasterpro
```

> Tokenless access enabled by default. Use `--rm -d` to run in background.

---

## πŸš€ Future Enhancements

- [x] Streamlit integration for dashboard browsing
- [x] JupyterLab with Docker
- [x] Advanced 3D visualizations
- [x] Statistical plotting techniques
- [x] Publication-ready themes
- [x] Comprehensive troubleshooting guide
- [x] Curated learning resources
- [x] Production-ready Python scripts
- [x] Quick copy-paste examples
- [x] Unit tests with pytest
- [ ] PDF report export
- [ ] Pip-installable library version
- [ ] Interactive Plotly/Bokeh integrations
- [ ] Real-world case studies
- [ ] CI/CD pipeline

---

## πŸ’Ό License

This project is licensed under the [GNU General Public License v3.0](https://www.gnu.org/licenses/gpl-3.0). See the [LICENSE](./LICENSE) file for more details.

---

## πŸ™Œ Contributing

Want to contribute?

- βœ… Fork the repo
- πŸ”§ Create a feature branch
- πŸ” Submit a PR with your improvements
- πŸ› Open issues for bugs or suggestions

---