atlas-mpl-style


Nameatlas-mpl-style JSON
Version 0.22.1 PyPI version JSON
download
home_pageNone
SummaryATLAS style for Matplotlib 3.0+
upload_time2023-05-04 16:41:47
maintainerNone
docs_urlNone
authorNone
requires_python>=3.6
licenseNone
keywords plotting atlas matplotlib cern root hep high-energy-physics physics
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ATLAS Matplotlib Style
======================
.. image:: https://img.shields.io/pypi/v/atlas-mpl-style?label=PyPI&style=for-the-badge   :alt: PyPI 

**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 the
`ATLAS <http://atlas.cern>`__ collaboration.

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

Install from PyPI using pip: :code:`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 <https://github.com/NLKNguyen/papercolor-theme>`__ 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 <https://github.com/voronianski/oceanic-next-color-scheme>`__
   theme

UHI and the PlottableHistogram protocol
----------------------------------------- 

With the development of the `UHI <https://github.com/henryiii/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
<https://github.com/scikit-hep/uproot4>`__ can be plotted directly, as can
`Boost-Histogram <https://github.com/scikit-hep/boost-histogram>`__ histograms
and `Hist <https://github.com/scikit-hep/hist>`__ objects (once the relevent PRs
are merged into those repositories).


``usetex=False`` Mode
------------------------

From version 0.15, it is possible to use the ATLAS style without a LaTeX
installation by passing ``usetex=False`` to ``use_atlas_style``. When this is
done, there are a few of points to bear in mind (particularly when producing PDF
plots):

1. The call to ``draw_atlas_label`` should be the last thing done before calling ``savefig``.
2. The figure ``dpi`` is set to 72 to match that of the PDF backend. This *must
   not* be 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.
3. Due to the above, the ``dpi`` parameter should not be passed when exporting to
   a raster format.
4. When converting a plotting script that uses ``usetex=True`` mode, ensure labels
   are updated to remove LaTeX macros that are not supported by Matplotlib's
   mathtext.

TeXLive and Fonts Needed
------------------------
When using the ATLAS style, text is (by default) typeset using LaTeX. From version 0.15, this can be avoided by passing ``usetex=False`` to ``use_atlas_style``.

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 <https://www.tug.org/texlive/quickinstall.html>`__.

**TeXLive is not required for the "slides" or "print" style.** `Fira Sans
<https://bboxtype.com/typefaces/FiraSans/>`__ and `Iosevka
<https://github.com/be5invis/Iosevka/releases/>`__ should be installed
for these styles to appear as intended. However, neither is *necessary*.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "atlas-mpl-style",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "plotting,atlas,matplotlib,cern,root,hep,high-energy-physics,physics",
    "author": null,
    "author_email": "Beojan Stanislaus <beojan.stanislaus@cern.ch>",
    "download_url": "https://files.pythonhosted.org/packages/74/7e/aad9de90cca9d0f8162982953dec8c5bcab4faa3a6692398535cb81cbdb7/atlas-mpl-style-0.22.1.tar.gz",
    "platform": null,
    "description": "ATLAS Matplotlib Style\n======================\n.. image:: https://img.shields.io/pypi/v/atlas-mpl-style?label=PyPI&style=for-the-badge   :alt: PyPI \n\n**Despite the last commit date, this package is still maintained. If you have any comments or improvements, open an issue or PR.**\n\nProvides a Matplotlib style replicating that used by the\n`ATLAS <http://atlas.cern>`__ collaboration.\n\n**Please open an issue if you find this style deviates from the guidelines.**\n\nInstall from PyPI using pip: :code:`pip install atlas-mpl-style`\n\nDocumentation: https://atlas-mpl.readthedocs.io/en/latest/index.html\n\nIn addition, this package also provides:\n\n- A function to draw the ATLAS label\n- A ``plot`` module containing functions to plot pre-binned histograms and\n   limits. This includes functionality for plotting stacked backgrounds along\n   with data and ratios in the usual ATLAS style.\n- A matplotlib style based on the background / foreground from the VIM `Paper <https://github.com/NLKNguyen/papercolor-theme>`__ color scheme, along with a print version with a white background.\n  - The default color cycle in all three styles is generated with HCL Wizard\n\n- Additional Matplotlib color definitions based on the Paper theme, and the\n   `Oceanic Next <https://github.com/voronianski/oceanic-next-color-scheme>`__\n   theme\n\nUHI and the PlottableHistogram protocol\n----------------------------------------- \n\nWith the development of the `UHI <https://github.com/henryiii/uhi>`__ interface,\nthis package now has support for histogram objects that follow the\n``PlottableHistogram`` protocol. ``plot.Background`` objects can be constructed\nusing ``PlottableHistograms`` and a list of such ``Backgrounds`` can be passed\nto ``plot.plot_backgrounds`` omitting the ``bins`` argument. The other histogram\nplotting functions could not be modified to accept ``PlottableHistogram`` in a\nbackward compatible manner since they take ``bins`` before the histogram\nargument. Alternate versions of these functions are therefore provided in the\n``uhi`` module.\n\nAs a result of this support, the histogram objects returned by `Uproot 4\n<https://github.com/scikit-hep/uproot4>`__ can be plotted directly, as can\n`Boost-Histogram <https://github.com/scikit-hep/boost-histogram>`__ histograms\nand `Hist <https://github.com/scikit-hep/hist>`__ objects (once the relevent PRs\nare merged into those repositories).\n\n\n``usetex=False`` Mode\n------------------------\n\nFrom version 0.15, it is possible to use the ATLAS style without a LaTeX\ninstallation by passing ``usetex=False`` to ``use_atlas_style``. When this is\ndone, there are a few of points to bear in mind (particularly when producing PDF\nplots):\n\n1. The call to ``draw_atlas_label`` should be the last thing done before calling ``savefig``.\n2. The figure ``dpi`` is set to 72 to match that of the PDF backend. This *must\n   not* be changed if the plot will be exported in PDF or (E)PS format since\n   doing so would cause the spacing in the ATLAS label to be incorrect.\n3. Due to the above, the ``dpi`` parameter should not be passed when exporting to\n   a raster format.\n4. When converting a plotting script that uses ``usetex=True`` mode, ensure labels\n   are updated to remove LaTeX macros that are not supported by Matplotlib's\n   mathtext.\n\nTeXLive and Fonts Needed\n------------------------\nWhen using the ATLAS style, text is (by default) typeset using LaTeX. From version 0.15, this can be avoided by passing ``usetex=False`` to ``use_atlas_style``.\n\nA working TeXLive installation providing the following is required:\n\n- pdflatex\n- amsmath\n- TeX Gyre Heros\n- mathastext\n- physics (the package)\n- siunitx\n\nIf no LaTeX installation is available, the style will warn and fall back to the ``usetex=False`` behaviour.\nTo check if all necessary packages are installed, try building ``atlas_mpl_style/testing/ampl-test.tex``.\n\nOn Arch (and related distributions), the ``texlive-most`` group is sufficient.\n\nOn Debian (Jessie or above) or Ubuntu (18.04+), the following set of packages should be sufficient. It is however highly recommended\nthat you install `texlive-full` to obtain a complete installation of texlive.\n\n- texlive\n- texlive-latex-extra\n- texlive-fonts-recommended\n- texlive-lang-greek\n- tex-gyre\n- dvipng\n- ghostscript\n\nOn CentOS 7, the supplied TeXLive (2012) is extremely old. TeXLive should be\ninstalled from `upstream <https://www.tug.org/texlive/quickinstall.html>`__.\n\n**TeXLive is not required for the \"slides\" or \"print\" style.** `Fira Sans\n<https://bboxtype.com/typefaces/FiraSans/>`__ and `Iosevka\n<https://github.com/be5invis/Iosevka/releases/>`__ should be installed\nfor these styles to appear as intended. However, neither is *necessary*.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "ATLAS style for Matplotlib 3.0+",
    "version": "0.22.1",
    "project_urls": {
        "Documentation": "https://atlas-mpl.readthedocs.io/en/latest/",
        "Home": "https://github.com/beojan/atlas-mpl"
    },
    "split_keywords": [
        "plotting",
        "atlas",
        "matplotlib",
        "cern",
        "root",
        "hep",
        "high-energy-physics",
        "physics"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "76474669a823e2b949d79c18a4de9904a9f3b22731772a3da3ca1ba88f0646b0",
                "md5": "34c81fcf963333138a38210cd08e87be",
                "sha256": "6f8c84591f6277896d5d8711ac0bf211c2e5a45bc140959ed14771455a27f3cf"
            },
            "downloads": -1,
            "filename": "atlas_mpl_style-0.22.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "34c81fcf963333138a38210cd08e87be",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 37632,
            "upload_time": "2023-05-04T16:41:45",
            "upload_time_iso_8601": "2023-05-04T16:41:45.150469Z",
            "url": "https://files.pythonhosted.org/packages/76/47/4669a823e2b949d79c18a4de9904a9f3b22731772a3da3ca1ba88f0646b0/atlas_mpl_style-0.22.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "747eaad9de90cca9d0f8162982953dec8c5bcab4faa3a6692398535cb81cbdb7",
                "md5": "2e75fb7d15ba90cb9efbad6024a9eaac",
                "sha256": "ba88f656c680da582b72e566c7507973d022df7357f31f71bb330ab5931bd786"
            },
            "downloads": -1,
            "filename": "atlas-mpl-style-0.22.1.tar.gz",
            "has_sig": false,
            "md5_digest": "2e75fb7d15ba90cb9efbad6024a9eaac",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 44096,
            "upload_time": "2023-05-04T16:41:47",
            "upload_time_iso_8601": "2023-05-04T16:41:47.483636Z",
            "url": "https://files.pythonhosted.org/packages/74/7e/aad9de90cca9d0f8162982953dec8c5bcab4faa3a6692398535cb81cbdb7/atlas-mpl-style-0.22.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-04 16:41:47",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "beojan",
    "github_project": "atlas-mpl",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "atlas-mpl-style"
}
        
Elapsed time: 0.07406s