This release is a pre-release and may not be stable for production use.
dartwork-mpl
A thin layer on top of matplotlib for publication-quality figures. Figure
and Axes stay native: you keep writing matplotlib, and dartwork-mpl adds a
style preset, physical sizes, deterministic margins and a figure checker.
It is built for one thing: turn on the bundled skill in your coding agent, say "draw this", and get a beautiful chart.
Install
pip install dartwork-mpl
Python 3.11 or later, matplotlib 3.11.2 or later.
First figure
import matplotlib.pyplot as plt
import dartwork_mpl as dm
dm.style.use("scientific") # preset by purpose
fig, ax = plt.subplots(figsize=dm.figsize("13cm", "standard")) # physical width + aspect
ax.plot([0, 1, 2, 3], [1, 3, 2, 4], label="signal")
ax.set_xlabel("Time (s)")
ax.set_ylabel("Level")
dm.simple_layout(fig) # content-aware margins
print(dm.check(fig)) # defects, if any
dm.save_formats(fig, "out", formats=("png", "pdf"))
Sizes take unit strings ("13cm", "5in") or dm.cm(13); text and line
sizes are relative to the preset (dm.fs(1), dm.lw(0), dm.fw(1)), so a
figure survives a change of preset.
For coding agents
python -m dartwork_mpl.guide install # link the skill into your project
The skill is the single source of the plotting rules. The agent draws with
its own shell (python plot.py) and reaches the rest from Python:
| Call | Does |
|---|---|
dm.check(fig) |
defects in a drawn figure; changes nothing |
dm.lint_code(code) |
anti-pattern lint; runs nothing |
Developing
uv sync
uv run ruff check && uv run ruff format --check
uv run basedpyright
uv run pytest -q -n auto --mpl
Read docs/handbook/index.md first: purpose,
structure, invariants and gates. Agents start at CLAUDE.md.
License
See LICENSE.
Metadata
Release files for dartwork-mpl 0.8.0a1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dartwork_mpl-0.8.0a1.tar.gz | 32.7 MB | With provenance | Details for dartwork_mpl-0.8.0a1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dartwork_mpl-0.8.0a1-py3-none-any.whl | Python 3 | none | any | Details for dartwork_mpl-0.8.0a1-py3-none-any.whl |
Total release size: 65.6 MB
Release files / dartwork_mpl-0.8.0a1.tar.gz
| Download URL | dartwork_mpl-0.8.0a1.tar.gz |
|---|---|
| Size | 32.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
454b9e4952399156bcc45ab0c80252ff81508280caea427446255943f7c219f8
|
|
BLAKE2b-256 checksum How to use checksums |
c039c769d5dee9df7967b07bf49b59c12edb7ea9217477fe970d4237a176e8f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 16, 2026.
Transparency logRelease files / dartwork_mpl-0.8.0a1-py3-none-any.whl
| Download URL | dartwork_mpl-0.8.0a1-py3-none-any.whl |
|---|---|
| Size | 32.8 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7a76f4c17d24bab08bfe3163156dff815b49c5dd041144c4b2dbd11cf44a1fed
|
|
BLAKE2b-256 checksum How to use checksums |
25456bb03c8eebdc85d84a8ebf027d3c1e4eba4d6eae78e0801aa5d2f741a1d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 16, 2026.
Transparency logSecurity for dartwork-mpl 0.8.0a1
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
Both files in this release have been uploaded with provenance metadata.
Attestation for dartwork_mpl-0.8.0a1.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 Nov 16, 2026.
Transparency logA 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.