ATLAS Style¶
This module contains the ATLAS Style definition for plotting, as well as methods for adding the ubiquitous ATLAS label and a few other deprecated methods for adding text to plots.
The ATLAS Style will automatically take care of setting up the ATLAS default plot formatting, and namely it will:
Remove the ROOT default grey background, and set all canvas backgrounds to white (except for TLegend objects);
Set the pad margins to decent values, so that your axis labels will not overlap on the axis figures;
Select the ATLAS default font (Helvetica) at its default size;
Select the default marker type (full circle, black);
Increase the default line thicknesses (figures in paper are usually greatly reduced: this improves visibility in both articles and conference presentations);
Avoid the display of any of the standard histogram decorations (title, statistics box, …);
Put tick marks on top and right hand side of your plots.
See https://twiki.cern.ch/twiki/bin/view/AtlasProtected/PubComPlotStyle for the full documentation on style guidelines for ATLAS plots (requires CERN login).
Examples
Import the module:
>>> import ROOT
>>> from atlasplots import atlas_style as astyle
Set the ATLAS Style globally:
>>> astyle.SetAtlasStyle()
Add the “ATLAS Internal” label:
>>> astyle.ATLASLabel(0.2, 0.87, "Internal")
For a collection of complete examples, see the Examples section.
-
atlas_style.
ATLASLabel
(x, y, text=None, color=1)[source]¶ Draw the ATLAS Label.
- Parameters
x (float) – x position in NDC coordinates
y (float) – y position in NDC coordinates
text (string, optional) – Text displayed next to label (the default is None)
color (TColor, optional) – Text colour (the default is 1, i.e. black). See https://root.cern.ch/doc/master/classTColor.html
-
atlas_style.
ATLASLabelOld
(x, y, preliminary=False, color=1)[source]¶ Draw the ATLAS Label (old version).
Note
Use
ATLASLabel()
instead.- Parameters
x (float) – x position in NDC coordinates
y (float) – y position in NDC coordinates
preliminary (bool, optional) – If True, write “Preliminary” next to label (the default is False)
color (TColor, optional) – Text colour (the default is 1, i.e. black). See https://root.cern.ch/doc/master/classTColor.html
-
atlas_style.
ATLASVersion
(version, x=0.88, y=0.975, color=1)[source]¶ Draw the version number.
- Parameters
version (string) – Version number
x (float, optional) – x position in NDC coordinates (the default is 0.88)
y (float, optional) – y position in NDC coordinates (the default is 0.975)
color (TColor, optional) – Text colour (the default is 1, i.e. black). See https://root.cern.ch/doc/master/classTColor.html