Skip to main content

ATLAS Plots for Humans

Project description


ATLAS Plots
ATLAS Plots

License Documentation Status PyPI - Python Version


:warning: I am no longer actively maintaining ATLAS Plots. If you find a bug, please feel free to open an issue or a pull request and I will get to it as soon as I can. Thank you for your continued interest!


ATLAS Plots provides a simple interface to produce plots in ROOT following the standard ATLAS style guidelines. It uses matplotlib-like syntax and idioms while still giving access to the underlying ROOT objects.

Behold, the simplicity of ATLAS Plots:

import atlasplots as aplt

aplt.set_atlas_style()

fig, ax = aplt.subplots(1, 1)
ax.set_xlabel("X [GeV]")
ax.set_ylabel("Events")
ax.set_xlim(0, 100)
ax.set_ylim(0, 10)

fig.savefig("figure.png")

Figure

Compare with the equivalent PyROOT code:

import ROOT
import atlasplots as aplt

aplt.set_atlas_style()

canv = ROOT.TCanvas("canv", "", 800, 600)
frame = ROOT.TH1F("frame", "", 1, 0, 1)
frame.GetXaxis().SetTitle("X [GeV]")
frame.GetYaxis().SetTitle("Events")
frame.GetXaxis().SetLimits(0, 100)
frame.GetYaxis().SetLimits(0, 10)
frame.Draw("AXIS")

canv.SaveAs("figure.png")

Installing

$ pip install atlasplots

You can also install in editable mode if you need a quick-and-dirty way to make changes to the source code:

$ git clone <project-url>
$ cd atlas-plots
$ pip install [--user] -e .

Examples

For those who learn by example

Several examples of more complex plots, such as histogram fits, ratio and fit-residual panels, Data/MC plots, etc., are available under the examples/ directory.

Documentation

The ATLAS Plots documentation is available at https://atlas-plots.readthedocs.io.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

atlasplots-0.1.11.tar.gz (23.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

atlasplots-0.1.11-py3-none-any.whl (24.5 kB view details)

Uploaded Python 3

File details

Details for the file atlasplots-0.1.11.tar.gz.

File metadata

  • Download URL: atlasplots-0.1.11.tar.gz
  • Upload date:
  • Size: 23.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for atlasplots-0.1.11.tar.gz
Algorithm Hash digest
SHA256 a0d45572884b1aac6c2450f996f8782b75dda5ae1329425cddd4374710fdec55
MD5 65f62dd147ee7b6cefad03ed321f7d10
BLAKE2b-256 8539069cd214660bfd540e50e2532967a3816f45dbf1bb473fa7b095efaea129

See more details on using hashes here.

Provenance

The following attestation bundles were made for atlasplots-0.1.11.tar.gz:

Publisher: publish-to-pypi.yml on joeycarter/atlas-plots

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file atlasplots-0.1.11-py3-none-any.whl.

File metadata

  • Download URL: atlasplots-0.1.11-py3-none-any.whl
  • Upload date:
  • Size: 24.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for atlasplots-0.1.11-py3-none-any.whl
Algorithm Hash digest
SHA256 97b4aded27e4d416c3f8c03c0e7cf8591d0ccbfec23b142e0f9e5a4799285a66
MD5 6ebea7a38a32fdc90fda616b43318dc1
BLAKE2b-256 d3237429f96a501bc68962809733906a064c63eac4f8c40135447035261c7ecb

See more details on using hashes here.

Provenance

The following attestation bundles were made for atlasplots-0.1.11-py3-none-any.whl:

Publisher: publish-to-pypi.yml on joeycarter/atlas-plots

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page