Skip to main content

Professional presentation-ready chart styles and color palettes for matplotlib

Project description

mpl-presentation-styles

Presentation-quality matplotlib charts in one line.

Stop formatting charts for board meetings. Start presenting.

Install

pip install mpl-presentation-styles

Three ways to use it

1. Quick charts (zero config)

import mpl_presentation_styles as mps

mps.bar({"Q1": 2.5, "Q2": 3.1, "Q3": 2.8, "Q4": 3.6}, title="Revenue ($M)")

2. With your existing matplotlib code (recommended)

import mpl_presentation_styles as mps
import matplotlib.pyplot as plt

mps.apply_palette("boardroom")

# All your existing code just looks better
plt.bar(["Q1", "Q2", "Q3", "Q4"], [2.5, 3.1, 2.8, 3.6])
plt.title("Revenue ($M)")
plt.show()

If you specifically want matplotlib style names, plt.style.use("mps-boardroom") is also supported in many environments, but apply_palette() is the most reliable API across notebook runtimes.

3. Scoped theming

from mpl_presentation_styles import theme, bar

with theme("startup"):
    bar(df, x="Region", y="Revenue", title="Q4 Revenue by Region")
# Previous style is automatically restored

Works with DataFrames

import pandas as pd
import mpl_presentation_styles as mps

df = pd.read_csv("sales.csv")
mps.bar(df, x="Region", y="Revenue", title="Revenue by Region")
mps.line(df, x="Month", y="Growth", title="Monthly Growth Trend")
mps.pie(df, x="Category", y="Share", title="Market Share")

Palettes

Name Style Best For
boardroom Navy/red professional Board decks, executive summaries
startup Purple/green modern Pitch decks, investor updates
classic Muted traditional Academic papers, journal submissions
dashboard High-contrast KPI dashboards, monitoring
print Grayscale Print reports, black & white
warm Amber/orange Marketing, inviting presentations

Smart defaults

  • Auto-register themes: mpl-presentation-styles registers custom themes automatically via a .pth startup hook, so plt.style.use("mps-boardroom") is available immediately after install — no explicit import required.
  • Auto-format values: $1.2M, $450K, $3,750
  • DataFrame-native: Pass column names directly
  • Auto-detect environment: Saves to /mnt/data/ in notebooks, ./ locally
  • Spines removed: Clean, modern look by default
  • 150 DPI: Presentation-ready resolution

Chart types

Function Type DataFrame Dict
mps.bar() Vertical/horizontal bars
mps.line() Trend lines with markers
mps.pie() Pie charts with % labels
mps.scatter() Scatter with annotations

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mpl_chart_styles-1.0.16.tar.gz (24.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mpl_chart_styles-1.0.16-py3-none-any.whl (27.4 kB view details)

Uploaded Python 3

File details

Details for the file mpl_chart_styles-1.0.16.tar.gz.

File metadata

  • Download URL: mpl_chart_styles-1.0.16.tar.gz
  • Upload date:
  • Size: 24.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for mpl_chart_styles-1.0.16.tar.gz
Algorithm Hash digest
SHA256 be7567b04b78c3005f62fc665d7e55a038614f502bb0bb098900db31f8b158f4
MD5 e3ac8460c6a64fbd6b8a0b3c64d9a15e
BLAKE2b-256 9564f32cf9c915f3bc1137afcbe3ce58683b519a1bc8a81463cdb0482fe50e63

See more details on using hashes here.

File details

Details for the file mpl_chart_styles-1.0.16-py3-none-any.whl.

File metadata

File hashes

Hashes for mpl_chart_styles-1.0.16-py3-none-any.whl
Algorithm Hash digest
SHA256 7c8c4bc719d0c310803708097db61e1e012649701caabbb7fd643d4a64cec661
MD5 5ffe1ea21ceb0d40ab9ad740d9d56cb0
BLAKE2b-256 20b05f2a178ec5ebe4d321a232cfe6f9feb99c862dde2480b188fbad3da81744

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page