{"id":5785,"library":"mplhep-data","title":"mplhep-data","description":"mplhep-data is a font (data) sub-package for `mplhep`, providing several common High Energy Physics fonts like Tex Gyre Termes and Latin Modern. It is currently at version 0.0.5 and appears to have an infrequent release cadence focused on adding new fonts or maintenance. It acts as a data provider, making these fonts available for `mplhep` styles rather than offering a direct Python API for users.","status":"active","version":"0.0.5","language":"en","source_language":"en","source_url":"https://github.com/Scikit-HEP/mplhep_data","tags":["matplotlib","HEP","fonts","data","plotting","scikit-hep"],"install":[{"cmd":"pip install mplhep-data","lang":"bash","label":"Install with pip"}],"dependencies":[],"imports":[{"note":"mplhep-data is a data package, not a library with public Python symbols for direct user import. Its contents (fonts) are consumed by the mplhep library when its styles are applied.","symbol":"N/A","correct":"mplhep-data provides data assets for mplhep; direct Python imports are not typically used by end-users."}],"quickstart":{"code":"import matplotlib.pyplot as plt\nimport mplhep as hep\n\n# mplhep-data is implicitly used by mplhep for its font assets.\n# Ensure mplhep-data is installed for full font support in mplhep styles.\n\nplt.style.use(hep.style.ATLAS) # Or hep.style.CMS, hep.style.LHCb, etc.\n\nfig, ax = plt.subplots()\nax.plot([0, 1], [0, 1])\nax.set_xlabel(\"x-axis\")\nax.set_ylabel(\"y-axis\")\nax.set_title(\"Example Plot with mplhep Style\")\nhep.atlas.label(\"Preliminary\") # Example using a label from mplhep\n\nplt.show()","lang":"python","description":"A basic `mplhep` plot demonstrating style application. When `mplhep-data` is installed, `mplhep` automatically gains access to its provided fonts, which are used by styles like `ATLAS` or `CMS` for correct rendering and consistent font usage across platforms."},"warnings":[{"fix":"Ensure `mplhep-data` is installed alongside `mplhep` using `pip install mplhep-data`.","message":"mplhep-data is a soft dependency of `mplhep`. If `mplhep` styles (e.g., ATLAS, CMS, LHCb) appear to render incorrectly or display default fonts, it is likely that `mplhep-data` has not been installed, preventing `mplhep` from accessing the intended fonts.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Rely on `mplhep` to manage and apply the fonts provided by `mplhep-data` via its styling system (`mplhep.style.use()`).","message":"As a data package, `mplhep-data` itself doesn't offer a Python API for direct user interaction. Attempts to `import mplhep_data` for programmatic use of fonts directly will likely be unfruitful, as its purpose is to make resources available to `mplhep`'s styling system.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Pin `mplhep-data` to a specific version if strict font consistency is critical across different deployment environments.","message":"Due to the low major version (0.x.x), minor version updates could potentially introduce new fonts or subtly modify existing ones. While typically stable for a data package, this might lead to minor visual changes in plots if specific font characteristics are strictly relied upon.","severity":"gotcha","affected_versions":"0.0.x"}],"env_vars":null,"last_verified":"2026-04-14T00:00:00.000Z","next_check":"2026-07-13T00:00:00.000Z"}