Skip to main content

Simple matplotlib plotting with consistent, publication-ready styling

Project description

hmbp

A simple matplotlib wrapper with consistent, publication-ready styling.

Installation

pip install hmbp

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 axes
  • set_labels(title, xlabel, ylabel) - Apply labels
  • save(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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hmbp-0.1.1.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hmbp-0.1.1-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file hmbp-0.1.1.tar.gz.

File metadata

  • Download URL: hmbp-0.1.1.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

Hashes for hmbp-0.1.1.tar.gz
Algorithm Hash digest
SHA256 7c1b1bb091a3dd573a862e2c449b62b2715145b55b09ae0a37e7e213c4066dae
MD5 016b3ada99203aef638a8bb4d076c4f0
BLAKE2b-256 0ed74432a556667c0da4a9de654b7a3e9c1c03855e0a9874e36d66a661f54009

See more details on using hashes here.

Provenance

The following attestation bundles were made for hmbp-0.1.1.tar.gz:

Publisher: pypi.yml on hmblair/hmbp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hmbp-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: hmbp-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for hmbp-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 73217c60ebe13519f3cb7b0604e1698d2499965a87d9260d3f51c3db2039e613
MD5 920746a9a59f5664568eef6d3ea9a1ce
BLAKE2b-256 c258a2db06804b99bdd689bb32dd8bd542c3929c13b61a9e3fadad1b7b11c88c

See more details on using hashes here.

Provenance

The following attestation bundles were made for hmbp-0.1.1-py3-none-any.whl:

Publisher: pypi.yml on hmblair/hmbp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page