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.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| myplots-0.1.5.tar.gz | 6.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| myplots-0.1.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.1 kB
Release files / myplots-0.1.5.tar.gz
| Download URL | myplots-0.1.5.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7488e1e370b1c03e451e02ee351911ca07af8e9d9d6a88da242587caa5f151a5
|
|
BLAKE2b-256 checksum How to use checksums |
bec22f697eac6bd8b49a8f271d182b65118d58804592948aead5c3813ba3169e
|
| 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.5-py3-none-any.whl
| Download URL | myplots-0.1.5-py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
14113c9ae22fe809e237b61b28949965db0854b2f12af4a08d944a9c674f9761
|
|
BLAKE2b-256 checksum How to use checksums |
a64db0066e2c84f0676b4d5b7cdc9b5db72cce786ebb6efa61fc0dfdaf48330b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|