Skip to content

datatreehouseplt

PyPI - Version PyPI - Python Version Docs

Matplotlib Theme for datatreehouse.org

Installation

uv add datatreehouseplt
# or
pip install datatreehouseplt

Matplotlib discovers plt.style.use("datatreehouseplt.dark") by looking for .mplstyle files inside the installed package, so it does need to be in your environment. Bleeding edge? Install straight from GitHub instead: uv add git+https://github.com/johandielangman/datatreehouseplt.

Styles

Dark theme collage

Light theme collage

The collages above are stitched together by the test suite from every snippet in the gallery.

Usage

Both styles are registered by name, no imports needed beyond Matplotlib itself:

import matplotlib.pyplot as plt

with plt.style.context("datatreehouseplt.dark"):  # or "datatreehouseplt.light"
    ...

See the Gallery for examples rendered in both styles.