Skip to main content

rikabplotlib

Matplotlib style sheets and helpers for physics plots.

pip install rikabplotlib
from rikabplotlib import newplot, hist_with_errors, hist_stack, ratio_panel, legend, BLUE, GREEN

fig, main, pull = newplot(ratio = True)

model = hist_stack(main, [continuum, reducible], bins = 40, range = (100, 180), colors = [BLUE, GREEN], labels = ["Continuum", "Reducible"])
data = hist_with_errors(main, measured, bins = 40, range = (100, 180), color = "black", label = "Data")
ratio_panel(pull, data.centers, data.counts, model.counts, data.errors, model.errors, mode = "pull")

main.set_ylabel("Events / 2 GeV")
pull.set_xlabel(r"$m_{\gamma\gamma}$ [GeV]")
legend(main)

Stacked model under the data

Figures: newplot, set_style, add_whitespace, stamp, badge, legend.

See an example in examples/rikabplotlib_examples.ipynb.

Download files

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

Source Distribution

rikabplotlib-0.0.5.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

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

rikabplotlib-0.0.5-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

Details for the file rikabplotlib-0.0.5.tar.gz.

File metadata

  • Download URL: rikabplotlib-0.0.5.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for rikabplotlib-0.0.5.tar.gz
Algorithm Hash digest
SHA256 715e3f0852fc8b630e1aa26e3fabb6b0471211611b00ba84ed2aaa3091e72a9c
MD5 a48a7e29b6d00e3339ddc8a39ac55d0d
BLAKE2b-256 24cf8d1448de0a0545ab3f1bcf3330ef7caf3c3050a88e436b09dc36de96a1bd

See more details on using hashes here.

File details

Details for the file rikabplotlib-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: rikabplotlib-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 12.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for rikabplotlib-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 de38f933606f320beaf67aa42489c7e501907faf2a0260b6a15629680ebf02f0
MD5 e846f8a66201d38e61d8b235903b0f97
BLAKE2b-256 72d6af7b407053da605e5e5ec153f55e6af221dcef681bcf33a9eeee2c4797e7

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.5 This release

2 files

0.0.4

2 files

0.0.3

2 files

0.0.1

2 files

Supported by

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