Simple matplotlib plotting with consistent, publication-ready styling
Project description
hmbp
A simple matplotlib wrapper with consistent, publication-ready styling.
Installation
pip install -e .
Style
- Font: Helvetica
- Colormap: RdPu (primary), PiYG (secondary/diverging)
- 400 DPI output
- Consistent sizing: title 15pt, labels 14pt, ticks 13pt, legend 12pt
Usage
import hmbp
fig, ax = hmbp.new_figure()
hmbp.line_plot(y_values, x_values, label="Model A")
hmbp.set_labels("Title", "X Label", "Y Label")
hmbp.save("output.png")
Available Functions
| Function | Description |
|---|---|
line_plot |
Line with optional fill |
scatter_plot |
Scatter with optional color mapping |
histogram |
Color-mapped histogram |
bar_plot |
Vertical/horizontal bars |
box_plot |
Box plot distributions |
violin_plot |
Violin plot distributions |
heatmap |
2D heatmap with colorbar |
line_plot_with_error |
Line with shaded error region |
confusion_matrix |
Annotated confusion matrix |
roc_curve |
ROC curve with AUC |
precision_recall_curve |
PR curve with AP |
residual_plot |
Regression residuals |
learning_curve |
Train/val learning curves |
metric_comparison |
Horizontal bar comparison |
volcano_plot |
Volcano plot for differential analysis |
Helpers
new_figure(figsize)- Create figure and axesset_labels(title, xlabel, ylabel)- Apply labelssave(path, fig, close)- Save with auto-legend
Quick API
Single-call functions that create, label, and save in one step:
import hmbp
hmbp.quick_histogram(data, title="Scores", xlabel="Value", path="hist.png")
hmbp.quick_bar(values, labels, title="Comparison", ylabel="F1", path="bars.png")
hmbp.quick_confusion_matrix(cm, class_names=["A", "B"], path="cm.png")
Available: quick_line, quick_scatter, quick_histogram, quick_bar, quick_heatmap, quick_confusion_matrix, quick_roc, quick_volcano
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hmbp-0.1.0.tar.gz.
File metadata
- Download URL: hmbp-0.1.0.tar.gz
- Upload date:
- Size: 12.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8789b75df9b2ae17ff4d7481d3ce8b3a50db3a4f187f678a7116926bbedb42bd
|
|
| MD5 |
bb6ee4fbf4372c6e9665d7ad1148eb0e
|
|
| BLAKE2b-256 |
602c0b0353e98a21d74f4c81e6028c0f0239068edb2ec6a2ab360af4b5efc50c
|
Provenance
The following attestation bundles were made for hmbp-0.1.0.tar.gz:
Publisher:
pypi.yml on hmblair/hmbp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hmbp-0.1.0.tar.gz -
Subject digest:
8789b75df9b2ae17ff4d7481d3ce8b3a50db3a4f187f678a7116926bbedb42bd - Sigstore transparency entry: 786739295
- Sigstore integration time:
-
Permalink:
hmblair/hmbp@7081845e2af005df58518d60a44d7fe26ffdf4c5 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/hmblair
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@7081845e2af005df58518d60a44d7fe26ffdf4c5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file hmbp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: hmbp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed59d0ab629498805c96b1db8bdc09786e177a8a839bcd9b6483940ea0761395
|
|
| MD5 |
f78c70397e94bff56d7629298491e3fd
|
|
| BLAKE2b-256 |
a8a17ea8c1d79f6a154ba06a871082983a9a82592871010751088440a3ec2a75
|
Provenance
The following attestation bundles were made for hmbp-0.1.0-py3-none-any.whl:
Publisher:
pypi.yml on hmblair/hmbp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hmbp-0.1.0-py3-none-any.whl -
Subject digest:
ed59d0ab629498805c96b1db8bdc09786e177a8a839bcd9b6483940ea0761395 - Sigstore transparency entry: 786739297
- Sigstore integration time:
-
Permalink:
hmblair/hmbp@7081845e2af005df58518d60a44d7fe26ffdf4c5 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/hmblair
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@7081845e2af005df58518d60a44d7fe26ffdf4c5 -
Trigger Event:
push
-
Statement type: