mplhep
Matplotlib styles for HEP
Decision gist · record as of 2026-08-14
Yes. mplhep is actively maintained, has no known vulnerabilities, carries a permissive MIT license, and solves a real problem for HEP researchers: conforming plots to collaboration standards with minimal effort. Low install friction and modest but stable community adoption make it a safe choice for physics plotting workflows. Install it if you are producing plots for HEP experiments or collaborations.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.11 or later; matplotlib and numpy must be installed.
- Low friction: pure Python wheel with four runtime dependencies (matplotlib, numpy, uhi, mplhep-data).
- Active maintenance with a release 22 days ago and recent commits; 221 repository stars indicate modest but steady community engagement.
License · maintenance · safety
MIT (permissive) — MIT license is permissive; you can use, modify, and distribute mplhep freely in commercial or private projects with minimal restrictions.
last release 2026-07-23 (22 days) · last repo commit 2026-08-14 · 221 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 368,011 downloads/mo, #7,192 on PyPI
Alternatives
Verify before relying
pip install mplhep
import mplhep as hep
import matplotlib.pyplot as plt
plt.style.use(hep.style.CMS)
# Create plots with CMS-compatible styling- Whether mplhep-data package is automatically installed as a dependency or must be installed separately.
- Specific font availability (Fira Sans, Tex Gyre Heros) and whether they are bundled or require system installation.
What it is and what it does
mplhep is a matplotlib extension that bundles styling presets and helper functions for producing plots that conform to High Energy Physics collaboration standards. It provides ready-made styles for CMS, ATLAS, LHCb, and ALICE experiments, allowing physicists to generate ROOT-like plots without manually configuring fonts, colors, and layout conventions. The package wraps matplotlib's styling system and adds domain-specific utilities, reducing boilerplate when preparing figures for HEP publications.
The package depends on matplotlib as its core plotting backend, numpy for numerical operations, and uhi (Universal Histogram Indexing) for histogram-specific functionality. It is actively maintained by the Scikit-HEP collaboration and has been used in multiple published HEP analyses. Installation is straightforward and adds minimal overhead—it is a pure Python wheel with no compiled dependencies.
Use it for
- Apply CMS, ATLAS, LHCb, or ALICE collaboration plot styles to matplotlib figures for consistency with experiment standards.
- Generate publication-ready physics plots with correct fonts and layout conventions without manual style configuration.
- Produce ROOT-compatible plot aesthetics in Python workflows when ROOT itself is not available or practical.
- Standardize plot appearance across a collaboration or analysis team by importing a shared style preset.
- Combine HEP-specific styling with custom matplotlib code for specialized physics visualizations.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
mplhep is actively maintained, has no known vulnerabilities, carries a permissive MIT license, and solves a real problem for HEP researchers: conforming plots to collaboration standards with minimal effort. Low install friction and modest but stable community adoption make it a safe choice for physics plotting workflows. Install it if you are producing plots for HEP experiments or collaborations.
Install
mplhep on PyPI
Before you install
Low friction: pure Python wheel with four runtime dependencies (matplotlib, numpy, uhi, mplhep-data). Active maintenance with a release 22 days ago and recent commits; 221 repository stars indicate modest but steady community engagement.
Requires Python 3.11 or later; matplotlib and numpy must be installed.
License in practice
MIT license is permissive; you can use, modify, and distribute mplhep freely in commercial or private projects with minimal restrictions.
Quickstart
pip install mplhep
import mplhep as hep
import matplotlib.pyplot as plt
plt.style.use(hep.style.CMS)
# Create plots with CMS-compatible styling
Verify before relying
- Whether mplhep-data package is automatically installed as a dependency or must be installed separately.
- Specific font availability (Fira Sans, Tex Gyre Heros) and whether they are bundled or require system installation.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.11 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 4 packagesmatplotlibmplhep-datanumpyuhi |
| Maintenance | Actively maintained 22 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 368,011 / month, #7,192 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Framework :: MatplotlibIntended Audience :: Science/ResearchProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/Engineering :: Physics |
Evidence: mplhep-1.3.2-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “HEP matplotlib styling”
- mplhepmplhep provides matplotlib styling and helper functions to produce…
- lovelyplotsLovelyPlots provides matplotlib style sheets that format scientific…
- SciencePlotsProvides a collection of Matplotlib style sheets designed to format…
Give your agent the search over MCP, or paste the wish link into any chat.
More Physics packages
NetworkX provides data structures and algorithms for creating, analyzing, and manipulating graphs and networks, supporting everything from simple undirected graphs to complex directed and weighted networks.
SymPy is a Python library for symbolic mathematics, performing algebraic manipulation, calculus, equation solving, and mathematical expression simplification without numerical approximation.
Pydicom reads, modifies, and writes DICOM medical imaging files in pure Python, with optional NumPy support for pixel data as arrays.
Install it if you work with medical imaging data, DICOM files, or healthcare IT systems.
Albumentations applies image transformations to training data, supporting classification, segmentation, object detection, and pose estimation with a unified API for images, masks, bounding boxes, and keypoints.
Install it if you need a unified, production-grade augmentation API for computer vision tasks.
CoolProp provides thermodynamic and transport property calculations for fluids and fluid mixtures, offering open-source functionality similar to REFPROP.
Provides quaternion representation, manipulation, and rotation operations for 3D geometry and animation, with support for smooth interpolation between orientations.
See also mplhep-data · lovelyplots · particle · coffea · SciencePlots · mplfonts · hepunits · koreanize-matplotlib · uproot · mpld3