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.
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| 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 |
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
Here are two dashboards from the project:

Advanced layout using GridSpec for flexible placement

Subplots with shared axes and tight layout for cleaner visuals
Here are animated visualizations exported from the project:
-
π¬
product_revenue_bars.mp4
Animated bar chart showing revenue distribution by product -
π
revenue_growth.mp4
Revenue growth over time with animated line movement -
π
units_revenue_growth.mp4
Dual-plot animation comparing units sold and revenue growth -
π
revenue_vs_units_scatter.mp4
Dynamic scatter plot showing correlation over time
| 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
pandasandnumpy, and stored underdatasets/.
Reusable helper functions to accelerate your matplotlib workflow:
utils/plot_utils.pyβ 20+ functions for common plots (line, bar, scatter, histogram, pie, etc.)utils/theme_utils.pyβ 8 publication-ready themes (dark, minimal, corporate, IEEE, colorblind-friendly, etc.)
Ready-to-run Python scripts in 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
Minimal, copy-paste ready scripts in 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
Professional unit tests in tests/:
- test_plot_utils.py β Tests for plotting functions (50+ tests)
- test_theme_utils.py β Tests for theme utilities (30+ tests)
Run tests:
python -m pytest tests/ -vWith coverage:
python -m pytest tests/ --cov=utils --cov-report=htmlQuick-reference syntax guides available at:
This project includes comprehensive documentation to support your learning:
- π SETUP.md β Complete environment setup guide with activation instructions
- π‘ RECOMMENDATIONS.md β Prioritized improvement suggestions and project roadmap
- π§ TROUBLESHOOTING.md β Solutions for common matplotlib issues (backends, fonts, performance, etc.)
- π RESOURCES.md β Curated learning resources (courses, books, communities, datasets)
- π€ CONTRIBUTING.md β Contribution guidelines for the project
- π CODE_OF_CONDUCT.md β Community standards and behavior expectations
- π scripts/README.md β Production scripts documentation
- π examples/README.md β Quick examples documentation
- π§ͺ tests/README.md β Testing guide and best practices
-
Clone the repository:
git clone https://github.com/SatvikPraveen/MatplotlibMasterPro.git cd MatplotlibMasterPro -
Use the quick activation script:
source activate.shOr activate manually:
source venv/bin/activate # macOS/Linux venv\Scripts\activate # Windows
-
Launch JupyterLab:
jupyter lab
-
Or run production scripts:
python scripts/generate_dashboard.py python examples/quick_start.py
-
Run tests (optional):
python -m pytest tests/ -v
π For detailed setup instructions, see SETUP.md
π‘ For improvement suggestions, see RECOMMENDATIONS.md
π§ For troubleshooting help, see TROUBLESHOOTING.md
π For learning resources, see RESOURCES.md
See the Dockerized Setup section below.
Explore exported dashboards interactively:
streamlit run streamlit_app.pyOr via Docker:
docker build -t matplotlibmasterpro .
docker run -p 8501:8501 matplotlibmasterproRun a fully isolated Jupyter + Streamlit environment with ease.
# Build the container
docker build -t matplotlibmasterpro .
# Launch Jupyter
docker run -p 8888:8888 matplotlibmasterproTokenless access enabled by default. Use
--rm -dto run in background.
- Streamlit integration for dashboard browsing
- JupyterLab with Docker
- Advanced 3D visualizations
- Statistical plotting techniques
- Publication-ready themes
- Comprehensive troubleshooting guide
- Curated learning resources
- Production-ready Python scripts
- Quick copy-paste examples
- Unit tests with pytest
- PDF report export
- Pip-installable library version
- Interactive Plotly/Bokeh integrations
- Real-world case studies
- CI/CD pipeline
This project is licensed under the GNU General Public License v3.0. See the LICENSE file for more details.
Want to contribute?
- β Fork the repo
- π§ Create a feature branch
- π Submit a PR with your improvements
- π Open issues for bugs or suggestions