lab74
lab74 is a Matplotlib style layer for scientific and institutional
figures in the technical print style of ca. 1965–1980.
The style uses fine rules, compact type, direct labels, monochrome textures, and one optional accent color. It does not add old-paper, film-grain, or other retro effects.
Installation
Install lab74 from PyPI:
pip install lab74
Requirements:
python>=3.12matplotlib>=3.8numpy>=1.26
Use
import matplotlib.pyplot as plt
import lab74
lab74.use()
fig, ax = plt.subplots()
ax.plot(x, y)
ax.set(xlabel="Energy (GeV)", ylabel=r"$\sigma$ (nb)")
The use() function applies the style. The default style is monochrome and
distinguishes series by line style alone, in proportional technical text.
Use these options to add an accent or to change the line series or typeface:
lab74.use("instrument") # Draw the first series in an accent.
lab74.use("aerospace") # Use a different accent.
lab74.use(line_series="grayscale") # Vary solid-line shades instead.
lab74.use(face="mono") # Use monospaced text.
An accent colors the first line of the cycle and carries through to bars,
bands, stairs, and contours. line_series applies only without one.
You can also apply the packaged Matplotlib style sheet:
plt.style.use(lab74.STYLE_PATH)
This sheet carries the same defaults as a bare lab74.use() call.
Plot tools
lab74 includes small tools for figure titles, annotations, region labels,
error bars, grouped bars, hatched regions, contours, maps, tables, ticks, grids,
frames, and multipanel layouts.
These tools return normal Matplotlib artists.
Thus, you can change the result with the Matplotlib API.
See src/lab74/ for all available tools and their docstrings.
Gallery
Executable notebooks are in the examples/.
Fonts
lab74 bundles IBM Plex Sans Condensed (the gothic face) and IBM Plex Mono
(the mono face), each in regular, italic, and medium weights, under the
SIL Open Font License 1.1. If neither font is
installed, lab74 falls back to DejaVu Sans and DejaVu Sans Mono.
Development
lab74 uses uv for environments,
Ruff for formatting and linting, and
ty for type checking. All four checks run in
CI on every push and pull request:
uv sync
uv run ruff format src tests
uv run ruff check src tests
uv run ty check
uv run pytest
License
lab74 is available under the MIT license.
Metadata
Release files for lab74 2.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lab74-2.1.0.tar.gz | 541.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lab74-2.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.1 MB
Release files / lab74-2.1.0.tar.gz
| Download URL | lab74-2.1.0.tar.gz |
|---|---|
| Size | 541.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
71df3321c46d368b4e354c68b57902370d9f56e4d3d6b817a7d671b8d4f3c9aa
|
|
BLAKE2b-256 checksum How to use checksums |
6bb495c513b7b80b9d4aa7d67da02d195d5ea30514d63e7ddb47f2213082a5e5
|
| 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 Oct 11, 2026.
Transparency logRelease files / lab74-2.1.0-py3-none-any.whl
| Download URL | lab74-2.1.0-py3-none-any.whl |
|---|---|
| Size | 543.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9c0a9c05429077cce3f96b2c6e2af6efe369df5d1259f5f553d2b0aa33327e74
|
|
BLAKE2b-256 checksum How to use checksums |
1160e8e68e49e6e949b36f3185636e7e714f5455ec5421ddefffcb059cfbf181
|
| 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 Oct 11, 2026.
Transparency log