https://github.com/scikit-hep/mplhep
Extended histogram plotting on top of matplotlib and HEP collaboration compatible styling
https://github.com/scikit-hep/mplhep
histograms matplotlib plotting python visualization
Last synced: 8 days ago
JSON representation
Extended histogram plotting on top of matplotlib and HEP collaboration compatible styling
- Host: GitHub
- URL: https://github.com/scikit-hep/mplhep
- Owner: scikit-hep
- License: mit
- Created: 2019-05-02T09:41:43.000Z (almost 7 years ago)
- Default Branch: main
- Last Pushed: 2025-04-07T19:28:24.000Z (11 months ago)
- Last Synced: 2025-04-12T04:48:51.827Z (11 months ago)
- Topics: histograms, matplotlib, plotting, python, visualization
- Language: Python
- Homepage: https://mplhep.readthedocs.io
- Size: 12 MB
- Stars: 196
- Watchers: 4
- Forks: 69
- Open Issues: 33
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Citation: CITATION.cff
Awesome Lists containing this project
- awesome-hep - mplhep
README

[](https://zenodo.org/badge/latestdoi/184555939)
[![Scikit-HEP][sk-badge]](https://scikit-hep.org/)
[](https://mplhep.readthedocs.io/en/latest/?badge=latest)
[sk-badge]: https://scikit-hep.org/assets/images/Scikit--HEP-Project-blue.svg
[![Actions Status][actions-badge]][actions-link]
[](https://results.pre-commit.ci/latest/github/scikit-hep/mplhep/main)
[](https://github.com/pre-commit/pre-commit)
[](https://badge.fury.io/py/mplhep)
[](https://anaconda.org/conda-forge/mplhep)
[](https://pypi.org/project/mplhep/)
[](https://img.shields.io/pypi/dw/mplhep?label=downloads%20%28incl%20CI%29)
[](https://mybinder.org/v2/gh/scikit-hep/mplhep/master)
A set of helpers for `matplotlib` to more easily produce plots typically
needed in HEP as well as style them in way that's compatible with current
collaboration requirements (ROOT-like plots for CMS, ATLAS, LHCb, ALICE).
## Installation
```bash
pip install mplhep
```
## Documentation and Getting Started
A tutorial given at PyHEP 2020 is available as a binder [here](https://github.com/andrzejnovak/2020-07-17-pyhep2020-mplhep)
or you can watch the recording [here](https://www.youtube.com/watch?v=gUziXqCGe0o).
Documentation can be found at [scikit-hep.org/mplhep](https://scikit-hep.org/mplhep/).
## Notes
### Citation
If you've found this library helpful and are able to, please consider citing it. You can find us on [Zenodo](doi.org/10.5281/zenodo.3766157) as a permalink to the latest version.
BiBTeX:
```
@software{Novak_mplhep_2020,
author = {Novak, Andrzej and Schreiner, Henry and Feickert, Matthew and Eschle, Jonas and Fillinger, Tristan and Praz, Cyrille},
doi = {10.5281/zenodo.3766157},
license = {MIT},
month = apr,
title = {{mplhep}},
url = {https://github.com/scikit-hep/mplhep},
year = {2020}
}
```
APA:
```
Novak, A., Schreiner, H., Feickert, M., Eschle, J., Fillinger, T., & Praz, C. (2020). mplhep [Computer software]. https://doi.org/10.5281/zenodo.3766157
```
### Use in publications
Updating list of citations and use cases of `mplhep` in publications:
- [Simultaneous Jet Energy and Mass Calibrations with Neural Networks](https://cds.cern.ch/record/2706189), ATLAS Collaboration, 2019
- [Integration and Performance of New Technologies in the CMS Simulation](https://arxiv.org/abs/2004.02327), Kevin Pedro, 2020 (Fig 5,6)
- [GeantV: Results from the prototype of concurrent vector particle transport simulation in HEP](https://arxiv.org/abs/2005.00949), Amadio et al, 2020 (Fig 25,26)
- [Search for the standard model Higgs boson decaying to charm quarks](https://cds.cern.ch/record/2682638), CMS Collaboration, 2019 (Fig 1)
- [Search for long-lived particles decaying to eμν](https://arxiv.org/abs/2012.02696), LHCb Collaboration, 2020
- [Measurement of the mass dependence of the transverse momentum of lepton pairs in Drell-Yan production in proton-proton collisions at √s = 13 TeV](http://arxiv.org/abs/2205.04897), CMS Collaboration, 2022 (Figs 3-)
- And many others by now...
[actions-badge]: https://github.com/scikit-hep/mplhep/workflows/CI/badge.svg
[actions-link]: https://github.com/scikit-hep/mplhep/actions