Skip to main content

ATLAS Matplotlib Style

https://img.shields.io/pypi/v/atlas-mpl-style?label=PyPI&style=for-the-badge:alt:PyPI

Provides a Matplotlib style replicating that used by the ATLAS collaboration.

Please open an issue if you find this style deviates from the guidelines.

Install from PyPI using pip: pip install atlas-mpl-style

Documentation: https://atlas-mpl.readthedocs.io/en/latest/index.html

In addition, this package also provides:

  • A function to draw the ATLAS label

  • A plot module containing functions to plot pre-binned histograms and

    limits. This includes functionality for plotting stacked backgrounds along with data and ratios in the usual ATLAS style.

  • A matplotlib style based on the background / foreground from the VIM Paper color scheme, along with a print version with a white background. - The default color cycle in all three styles is generated with HCL Wizard

  • Additional Matplotlib color definitions based on the Paper theme, and the

    Oceanic Next theme

UHI and the PlottableHistogram protocol

With the development of the UHI interface, this package now has support for histogram objects that follow the PlottableHistogram protocol. plot.Background objects can be constructed using PlottableHistograms and a list of such Backgrounds can be passed to plot.plot_backgrounds omitting the bins argument. The other histogram plotting functions could not be modified to accept PlottableHistogram in a backward compatible manner since they take bins before the histogram argument. Alternate versions of these functions are therefore provided in the uhi module.

As a result of this support, the histogram objects returned by Uproot 4 can be plotted directly, as can Boost-Histogram histograms and Hist objects (once the relevent PRs are merged into those repositories).

usetex=False Mode

usetex=False is now the default, removing the LaTeX dependency.

If you convert a plotting script that uses usetex=True mode, make sure labels are updated to remove LaTeX macros that are not supported by Matplotlib’s mathtext.

TeXLive and Fonts Needed

If you have a full LaTeX installation available, you can use LaTeX to typeset the text by passing usetex=True to use_atlas_style. This will give you much greater options in terms of what can be included in labels.

A working TeXLive installation providing the following is required:

  • pdflatex

  • amsmath

  • TeX Gyre Heros

  • mathastext

  • physics (the package)

  • siunitx

If no LaTeX installation is available, the style will warn and fall back to the usetex=False behaviour. To check if all necessary packages are installed, try building atlas_mpl_style/testing/ampl-test.tex.

On Arch (and related distributions), the texlive-most group is sufficient.

On Debian (Jessie or above) or Ubuntu (18.04+), the following set of packages should be sufficient. It is however highly recommended that you install texlive-full to obtain a complete installation of texlive.

  • texlive

  • texlive-latex-extra

  • texlive-fonts-recommended

  • texlive-lang-greek

  • tex-gyre

  • dvipng

  • ghostscript

On CentOS 7, the supplied TeXLive (2012) is extremely old. TeXLive should be installed from upstream.

TeXLive is not required for the “slides” or “print” style. Fira Sans and Iosevka should be installed for these styles to appear as intended. However, neither is necessary.

Metadata

Release files for atlas-mpl-style 0.26.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 atlas-mpl-style 0.26.0
File Size Uploaded
atlas_mpl_style-0.26.0.tar.gz 35.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for atlas-mpl-style 0.26.0
File Interpreter ABI Platform
atlas_mpl_style-0.26.0-py3-none-any.whl Python 3 none any Details

Total release size: 73.8 kB

Release files / atlas_mpl_style-0.26.0.tar.gz

Download URL atlas_mpl_style-0.26.0.tar.gz
Size 35.6 kB
Tags Source
SHA-256 checksum
How to use checksums
0c6467dabde5e06ccf78fac97100b42abf143ca44e9432646e218efc332fea9d
BLAKE2b-256 checksum
How to use checksums
6d69cf3d90bd3a17217baf447d9478717b7aa0f33d5db4cb256ee4776e7b2140
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.34.2

Release files / atlas_mpl_style-0.26.0-py3-none-any.whl

Download URL atlas_mpl_style-0.26.0-py3-none-any.whl
Size 38.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bc32686cecd4010bbb11dcea1a56a7edb50bcec249038ed5ebaca279a6216740
BLAKE2b-256 checksum
How to use checksums
c721c087de6d450bec68020a833d9d4028db406c56f6580ac58cf7a7669dd90d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.34.2

Release history Release notifications | RSS feed

This release

0.26.0 This release

2 release files

0.25.0

2 release files

0.24.1

2 release files

0.24.0

2 release files

0.23.3

2 release files

0.23.2

2 release files

0.23.1

2 release files

0.23.0

2 release files

0.21.0

1 release file

0.20.0

2 release files

0.19.1

2 release files

0.19.0

2 release files

0.18.2

2 release files

0.18.1

2 release files

0.18.0

2 release files

0.17.3

2 release files

0.17.2

2 release files

0.17.1

2 release files

0.17.0

2 release files

0.16.3

2 release files

0.15.0

2 release files

0.14.0

2 release files

0.12.4

2 release files

0.12.3

2 release files

0.12.2

2 release files

0.12.1

2 release files

0.12

2 release files

0.11.4

2 release files

0.11.2

2 release files

0.11.1

2 release files

0.10.2

2 release files

0.10.1

2 release files

0.10.0

2 release files

0.9.2

1 release file

0.9.1

2 release files

0.9.0

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.1

1 release file

0.4

1 release file

0.3

2 release files

0.2

2 release files

0.1

2 release files

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