Skip to main content

Make your matplotlib dripped up.

Project description

matplotdrip

histogram

Installable matplotlib style sheet, a color cycle, and some nice colormaps.

I use these settings because I think they make plots that are "good", but also (as the kids would say) "dripped up".

Installation

Easiest is from PyPI either with pip

pip install matplotdrip

or uv (recommended)

uv add matplotdrip

Or, you can clone and build from source

git clone git@github.com:TomHilder/matplotdrip.git
cd matplotdrip
pip install -e .

where in the last step we made an editable install with pip but you can do whatever you like.

Usage

To use the plotting style:

import matplotdrip  # Registers the style with matplotlib

plt.style.use("drip")

To get a colour from the cycle by index, wrapping around if the index exceeds the number of colours:

from matplotdrip import get_color
c = get_color(N) # N is any positive integer

To access the custom colormaps:

from matplotdrip import colormaps
# Then simply use `red_white_blue` or `red_white_blue_r` in place of any mpl cmap
plt.imshow(..., cmap="red_white_blue_r")

LaTeX

For the best-looking plots, install LaTeX on your system. The style will automatically use LaTeX for text rendering when available, giving you proper Computer Modern fonts and math typesetting.

If LaTeX is not installed, the style falls back to matplotlib's built-in mathtext renderer with Computer Modern fonts - still looks good, just not quite as crisp.

Installing LaTeX:

  • macOS: brew install --cask mactex or install BasicTeX for a smaller footprint
  • Ubuntu/Debian: sudo apt install texlive-latex-extra texlive-fonts-recommended dvipng cm-super
  • Windows: Install MiKTeX or TeX Live

Credit

The colour cycle is from manim, and the red_white_blue colourmap is from this repo.

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

matplotdrip-2.1.0.tar.gz (81.5 kB view details)

Uploaded Source

Built Distribution

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

matplotdrip-2.1.0-py3-none-any.whl (53.8 kB view details)

Uploaded Python 3

File details

Details for the file matplotdrip-2.1.0.tar.gz.

File metadata

  • Download URL: matplotdrip-2.1.0.tar.gz
  • Upload date:
  • Size: 81.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for matplotdrip-2.1.0.tar.gz
Algorithm Hash digest
SHA256 25b97ec1e4ff4d3429d5e7fd77eb59bd4806240e3a2fc6c3738d0f06b6d2837f
MD5 f4893202dcf17fa5c8e508077a71815f
BLAKE2b-256 1998c57e67067734a49731c9865324beeccd5d9841cb1324e9cb73289e07cfc2

See more details on using hashes here.

Provenance

The following attestation bundles were made for matplotdrip-2.1.0.tar.gz:

Publisher: release.yml on TomHilder/matplotdrip

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file matplotdrip-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: matplotdrip-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 53.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for matplotdrip-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e09361c07170d44b001e5b318e3eb2cb6c67728b70b964d5dc174911f4117ac9
MD5 3d0cffffed0f63b4efdd2d149a584408
BLAKE2b-256 7099c753564b59a5115d199d2a2e617ac97fa1cd24352189087da31f20db09af

See more details on using hashes here.

Provenance

The following attestation bundles were made for matplotdrip-2.1.0-py3-none-any.whl:

Publisher: release.yml on TomHilder/matplotdrip

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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