Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 1.1.4 instead.

Onsaemiro

Publication-ready figures and portable scientific output for Python.

Onsaemiro is a small presentation layer for Matplotlib figures, notebook output, and terminal reports. It provides journal-sized layouts, accessible visual styles, tables, progress reporting, and concise status output without wrapping Matplotlib's plotting API.

The default style follows the Science single-column preset. Other journal presets and explicit physical sizes remain available.

Installation

pip install onsaemiro

Figures

Create figures directly, then use ordinary Matplotlib methods:

import onsaemiro as osm

osm.set_style(palette="okabe-ito")
fig, ax = osm.subplots(journal="science", column="single")

styles = osm.build_style_map(["baseline", "model"])
ax.plot(x, baseline, **styles["baseline"], label="Baseline")
ax.plot(x, prediction, **styles["model"], label="Model")
osm.finalize(ax)

osm.export_figure(fig, "figures/comparison", formats=("pdf", "png"))

figsize(journal, column) returns a configured physical size when only the dimensions are needed. Presets are practical starting points; always check the journal's current author instructions.

Tables and progress

Tables provide both plain-text and HTML representations, so the same object is readable in notebooks, terminals, and redirected logs:

table = osm.Table("Model comparison", ["Case", "RMSE"])
table.add_row("baseline", 0.041)
table.add_row("model", 0.018)
table.show()

Use track() for iterable work or update a progress object explicitly:

for case in osm.track(cases, desc="Evaluating"):
    evaluate(case)

progress = osm.Progress(total=epochs, desc="Training")
for epoch in range(epochs):
    loss = train(epoch)
    progress.set(loss=f"{loss:.4f}")
    progress.update()
progress.finish()

Terminal output

osm.echo("Run completed", tone="success")
osm.rule("Summary")

Colour is used only when the output supports it. Redirected output remains plain, and NO_COLOR and TERM=dumb are respected.

See the journal guide, API reference, and changelog for the complete public surface and release history.

Metadata

Release files for onsaemiro 1.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 onsaemiro 1.1.0
File Size Uploaded
onsaemiro-1.1.0.tar.gz 22.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for onsaemiro 1.1.0
File Interpreter ABI Platform
onsaemiro-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 42.7 kB

Release files / onsaemiro-1.1.0.tar.gz

Download URL onsaemiro-1.1.0.tar.gz
Size 22.5 kB
Tags Source
SHA-256 checksum
How to use checksums
1b227328d297d7a0e2af9010115fd85601bc2820df27d02841f618d03ca1a530
BLAKE2b-256 checksum
How to use checksums
704affaebeb0ca32ff538c2eab9e2e4b556b8da995562678f3b4e2f88d169753
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release files / onsaemiro-1.1.0-py3-none-any.whl

Download URL onsaemiro-1.1.0-py3-none-any.whl
Size 20.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ce13af66b3e8ad34f58d569cea4fdef1c8d4decbd1ca7ea673284cd3fc9f743a
BLAKE2b-256 checksum
How to use checksums
2ad1c74b6183b2059d72329d186c8333cffc878ac3eee220e76aaf9e6f2e6a4a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13
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