Skip to main content

cmsstyle

Holding repo for CMS plotting style ROOT macros guidelines available at https://cms-analysis.docs.cern.ch/guidelines/plotting/general/

Both python and C++ implementations available.

Installation

Python:

pip install cmsstyle

Once this is done, the import cmsstyle should work from any location.

C++:

git clone https://github.com/cms-cat/cmsstyle.git
cd cmsstyle
source scripts/setup_cmstyle

For the C++ to work from inside ROOT (and any location), it is recommended to add something like the following to the rootlogon.C macro (or equivalent):

  std::string var = string(gROOT->GetMacroPath())+":"+gSystem->Getenv("CMSSTYLE_DIR")+"/src";
  gROOT->SetMacroPath(var.c_str());
  std::cout<<"Adding the ${CMSSTYLE_DIR}/src to the macro path"<<std::endl;
}

In fact a similar configuration may be achieved by modifying the ${HOME}/.rootrc instead.

Installation inside the CMSSW

If you use a CMSSW that supports the scram-venv you may use that to achieve the installation of the python package with pip already locally, as described in this page using the following instructions:

cmsenv

pip install cmstyle

It should be remarked that after installation of the venv (done by scram-venv) that step is no longer needed, but the working directory should be used always in the virtual enviroment (that should be already setup when doing the commonly required cmsenv command.

Remark that if you have a local installacion of cmsstyle, it may collide with the virtual environment, so you may want to do

to prevent the conflicts.

In the case of the C++ code, it is possible to add the code as source code but downloading the packages as mentioned above. Keep in mind that the repository does not follows the required structure for CMSSW packages, so you may encounter difficulties to integrate. Do not hesitate to contact us for the use case.

Documentation

Documentation for the Python implementation is available at cmsstyle.readthedocs.io. C++ implementation is analogous.

Metadata

Release files for cmsstyle 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cmsstyle 0.5.0
File Size Uploaded Provenance
cmsstyle-0.5.0.tar.gz 45.5 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for cmsstyle 0.5.0
File Interpreter ABI Platform
cmsstyle-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 72.5 kB

Release files / cmsstyle-0.5.0.tar.gz

Download URL cmsstyle-0.5.0.tar.gz
Size 45.5 kB
Tags Source
SHA-256 checksum
How to use checksums
6f40694c153072048e31a83cbc7c15c9bb24c8d674026224e4ca62e269b58266
BLAKE2b-256 checksum
How to use checksums
ff436e413b8689af32b1d98f5a741d6f4cfcdfc83d3295b0cef10b34c35ce33a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2025.

Transparency log

Release files / cmsstyle-0.5.0-py3-none-any.whl

Download URL cmsstyle-0.5.0-py3-none-any.whl
Size 27.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eda97ceb049bc85a86cab438d56d6755c66ce1c561f3505e713fc498e69a28f0
BLAKE2b-256 checksum
How to use checksums
f91231f15a639fbc2cf89c001caa03014f667618317dc7fd03f8afef56b3ab84
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2025.

Transparency log

Security for cmsstyle 0.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for cmsstyle-0.5.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page