Skip to main content

myplots

Minimal plotting utilities for consistently formatted scientific matplotlib figures.

Usage

import myplots as p

p.use_style()
fig, ax = p.new()

Installation

Clone the repository and install in editable mode:

pip install -e .

Quick start

import numpy as np
import myplots as p

# Apply global plotting style
p.use_style(doc_fontsize=10, fig_width="single")

# Generate some data
x = np.linspace(0, 10, 100)
y = np.sin(x)

# Create figure
fig, ax = p.new()

# Plot
p.line(ax, x, y, label="signal")
p.label(ax, rf"{p.bm('x')} axis", rf"{p.bm('y')} axis")
p.legend(ax)

# Save
p.save(fig, "figure.png")

Plotting

p.line(ax, x, y)
p.scatter(ax, x, y)
p.errorbar(ax, x, y, yerr)

Subplots

fig, axs = p.new(nrows=2, ncols=2)

Labels and legends

p.label(ax, "x", "y", "Title")
p.legend(ax)

Subplot annotation

p.annotate_subplots(axs)

Domain specific helpers

p.plot_energy(ax, t, E)
p.plot_temperature(ax, t, T)
p.plot_histogram(ax, data)
p.plot_with_error(ax, x, y, yerr)

Metadata

Release files for myplots 0.1.4

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

Source distribution (sdist)

Source distribution for myplots 0.1.4
File Size Uploaded
myplots-0.1.4.tar.gz 6.5 kB Details

Built distribution (wheel)

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

Total release size: 14.2 kB

Release files / myplots-0.1.4.tar.gz

Download URL myplots-0.1.4.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
55cfd4a08f6670c13beb293e1f787702ee6bbe2eedc43c0bffd01d31402b6980
BLAKE2b-256 checksum
How to use checksums
b4b6844e7c34921455d8172f7887eb5cd5d3faecaca2f94798b1f3ba98006258
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / myplots-0.1.4-py3-none-any.whl

Download URL myplots-0.1.4-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
136a9b8fc4da150cb010e10247345bdf9ac8d60604ea934209794fff63828624
BLAKE2b-256 checksum
How to use checksums
f660bc92bf3c338ed28d7a3762bc7effb8a366228a95a46e76eeb48cefd39374
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release history Release notifications | RSS feed

0.1.5

2 release files

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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