Package: atlas-mpl-style
Despite the last commit date, this package is still maintained. If you have any comments or improvements, open an issue or PR.Provides a Matplotlib style replicating that used by theATLAScollaboration.Please open an issue if you find this style deviates from the guidelines.Install from PyPI using pip:pip install atlas-mpl-styleDocumentation:https://atlas-mpl.readthedocs.io/en/latest/index.htmlIn addition, this package also provides:A function to draw the ATLAS labelAplotmodule containing functions to plot pre-binned histograms andlimits. 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 VIMPapercolor scheme, along with a print version with a white background.
- The default color cycle in all three styles is generated with HCL WizardAdditional Matplotlib color definitions based on the Paper theme, and theOceanic NextthemeUHI and the PlottableHistogram protocolWith the development of theUHIinterface,
this package now has support for histogram objects that follow thePlottableHistogramprotocol.plot.Backgroundobjects can be constructed
usingPlottableHistogramsand a list of suchBackgroundscan be passed
toplot.plot_backgroundsomitting thebinsargument. The other histogram
plotting functions could not be modified to acceptPlottableHistogramin a
backward compatible manner since they takebinsbefore the histogram
argument. Alternate versions of these functions are therefore provided in theuhimodule.As a result of this support, the histogram objects returned byUproot 4can be plotted directly, as canBoost-Histogramhistograms
andHistobjects (once the relevent PRs
are merged into those repositories).usetex=FalseModeFrom version 0.15, it is possible to use the ATLAS style without a LaTeX
installation by passingusetex=Falsetouse_atlas_style. When this is
done, there are a few of points to bear in mind (particularly when producing PDF
plots):The call todraw_atlas_labelshould be the last thing done before callingsavefig.The figuredpiis set to 72 to match that of the PDF backend. Thismust
notbe changed if the plot will be exported in PDF or (E)PS format since
doing so would cause the spacing in the ATLAS label to be incorrect.Due to the above, thedpiparameter should not be passed when exporting to
a raster format.When converting a plotting script that usesusetex=Truemode, ensure labels
are updated to remove LaTeX macros that are not supported by Matplotlib’s
mathtext.TeXLive and Fonts NeededWhen using the ATLAS style, text is (by default) typeset using LaTeX. From version 0.15, this can be avoided by passingusetex=Falsetouse_atlas_style.A working TeXLive installation providing the following is required:pdflatexamsmathTeX Gyre Herosmathastextphysics (the package)siunitxIf no LaTeX installation is available, the style will warn and fall back to theusetex=Falsebehaviour.
To check if all necessary packages are installed, try buildingatlas_mpl_style/testing/ampl-test.tex.On Arch (and related distributions), thetexlive-mostgroup 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 installtexlive-fullto obtain a complete installation of texlive.texlivetexlive-latex-extratexlive-fonts-recommendedtexlive-lang-greektex-gyredvipngghostscriptOn CentOS 7, the supplied TeXLive (2012) is extremely old. TeXLive should be
installed fromupstream.TeXLive is not required for the “slides” or “print” style.Fira SansandIosevkashould be installed
for these styles to appear as intended. However, neither isnecessary.