Skip to content

SatvikPraveen/MatplotlibMasterPro

Repository files navigation

πŸ“Š MatplotlibMasterPro

License: GPL v3 Python Jupyter Notebooks Matplotlib Focused Project Status Open Source Dashboard Ready Animations Streamlit Compatible Portfolio Project Contributions


🧠 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

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
Advanced layout using GridSpec for flexible placement

πŸͺŸ Subplots Layout
Subplots with shared axes and tight layout for cleaner visuals

🎞️ Animated Visualizations

Here are animated visualizations exported from the project:

πŸ§ͺ 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/.


πŸ› οΈ Utilities

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.)

🐍 Production Scripts

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


πŸš€ Quick Examples

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


πŸ§ͺ Testing

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/ -v

With coverage:

python -m pytest tests/ --cov=utils --cov-report=html

🧾 Cheatsheets

Quick-reference syntax guides available at:


πŸ“– Documentation & Resources

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

πŸš€ Getting Started

Option 1: Virtual Environment (Recommended)

  1. Clone the repository:

    git clone https://github.com/SatvikPraveen/MatplotlibMasterPro.git
    cd MatplotlibMasterPro
  2. Use the quick activation script:

    source activate.sh

    Or activate manually:

    source venv/bin/activate  # macOS/Linux
    venv\Scripts\activate     # Windows
  3. Launch JupyterLab:

    jupyter lab
  4. Or run production scripts:

    python scripts/generate_dashboard.py
    python examples/quick_start.py
  5. 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

Option 2: Docker (Isolated Environment)

See the Dockerized Setup section below.


🌐 Streamlit App

Explore exported dashboards interactively:

streamlit run streamlit_app.py

Or via Docker:

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

🐳 Dockerized Setup

Run a fully isolated Jupyter + Streamlit environment with ease.

# 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

  • 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

πŸ’Ό License

This project is licensed under the GNU General Public License v3.0. See the 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

About

πŸ“· 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.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors