Skip to main content

oh-mpl-paper

Python

Publication-ready Matplotlib styles, one function call away. Every academic project ends up rewriting the same 40 lines of rcParams boilerplate to get figures that satisfy a journal's font, size, and line-weight requirements — oh-mpl-paper bundles that boilerplate as a handful of named, tested .mplstyle presets and a two-line API.

Installation

pip install git+https://github.com/OscarHickman/thesis-themes.git

Usage

import oh_mpl_paper as p
import matplotlib.pyplot as plt

p.setconfig("nature")          # sets all rcParams for the chosen style

plt.plot(x, y)
plt.savefig("figure.pdf")      # sized and styled for the target venue

print(p.available())           # ['base', 'ieee', 'k.wang', 'nature', 'poster', 'presentation']

Calling setconfig with an unrecognised name raises a ValueError listing every style currently bundled with the package.

Available styles

Style Use case
base Generic scientific-paper defaults (Type 42 fonts, colorblind-safe cycle).
nature Single-column Nature-family figures, 89mm wide, 8pt sans-serif fonts.
ieee IEEE transactions single-column format, 3.5in wide, Times New Roman.
k.wang SaUCE/sauce_xi MNRAS paper-figures house style (single-column, serif + Computer Modern math, muted inward ticks).
presentation 16:9 slide decks — large fonts, thick lines, transparent background.
poster A0 conference posters — very large fonts, thick lines for ~2m viewing.

All styles embed Type 42 (TrueType) fonts in PDF/PS output so text stays editable in Illustrator or Inkscape, and default to a colorblind-safe categorical color cycle.

Development

pip install -e ".[test]"
pytest

Releasing

Pushing a tag of the form vX.Y.Z triggers .github/workflows/publish.yml, which builds the package and publishes it to PyPI via Trusted Publishing (no API token stored in this repo). The tag's version must match the version field in pyproject.toml or the workflow fails before publishing.

# bump version in pyproject.toml, commit, then:
git tag v0.1.1
git push origin v0.1.1

PyPI-side setup (one-time, done outside this repo): add a trusted publisher on the oh-mpl-paper project pointing at this GitHub repo, workflow file publish.yml, and environment name pypi.

Metadata

Release files for oh-mpl-paper 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for oh-mpl-paper 0.1.0
File Size Uploaded Provenance Actions
oh_mpl_paper-0.1.0.tar.gz 6.3 kB With provenance Details for oh_mpl_paper-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for oh-mpl-paper 0.1.0
File Interpreter ABI Platform Actions
oh_mpl_paper-0.1.0-py3-none-any.whl Python 3 none any Details for oh_mpl_paper-0.1.0-py3-none-any.whl

Total release size: 14.4 kB

Release files / oh_mpl_paper-0.1.0.tar.gz

Download URL oh_mpl_paper-0.1.0.tar.gz
Size 6.3 kB
Tags Source
SHA-256 checksum
How to use checksums
2236a02528d35cfc1dcc66ac5fd13505f5c8b4d085f8cf1e7534c8adc8bd726c
BLAKE2b-256 checksum
How to use checksums
be74dfe74b30eb7235472e9748f3b833a938d38362a74bc9620354fda04485d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.

Transparency log

Release files / oh_mpl_paper-0.1.0-py3-none-any.whl

Download URL oh_mpl_paper-0.1.0-py3-none-any.whl
Size 8.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ee4a25c5d4c97446519de7de0bcb413a08d601ca70ecf441dc3d1cb0994e4c25
BLAKE2b-256 checksum
How to use checksums
5e6a60d8a7144ff60370f66f8e485c9afcd596f3a7a53ec3fc67ede6699c2b88
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.

Transparency log

Security for oh-mpl-paper 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for oh_mpl_paper-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page