StonerPlots


NameStonerPlots JSON
Version 1.3.4 PyPI version JSON
download
home_pageNone
SummaryThis is a fork of scienceplots and provides a range of matplotlib styles for plotting physics...
upload_time2024-04-07 19:29:59
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseNone
keywords matplotlib-style-sheets matplotlib-figures scientific-papers thesis-template matplotlib-styles python
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![GitHub version](https://badge.fury.io/gh/stonerlab%2Fstonerplots.svg)](https://badge.fury.io/gh/stonerlab%2Fstonerplots)
[![pytest](https://github.com/stonerlab/stonerplots/actions/workflows/pytest.yaml/badge.svg)](https://github.com/stonerlab/stonerplots/actions/workflows/pytest.yaml)
[![PyPI version](https://badge.fury.io/py/StonerPlots.svg)](https://badge.fury.io/py/StonerPlots)
[![Build Docs](https://github.com/stonerlab/stonerplots/actions/workflows/publish_sphinx.yaml/badge.svg)](https://stonerlab.github.io/stonerplots/)
[![Conda](https://github.com/stonerlab/stonerplots/actions/workflows/build_conda.yaml/badge.svg)](https://github.com/stonerlab/stonerplots/actions/workflows/build_conda.yaml)
[![Conda Version](https://anaconda.org/phygbu/stonerplots/badges/version.svg)](https://anaconda.org/phygbu/stonerplots)
![Not platform specific](https://anaconda.org/phygbu/stonerplots/badges/platforms.svg)
![MIT Licensed](https://anaconda.org/phygbu/stonerplots/badges/license.svg)
[![DOI](https://zenodo.org/badge/776970304.svg)](https://zenodo.org/doi/10.5281/zenodo.10905673)


Stoner Plots
=============

Stoner Plots is a fork of Science Plots

<img src="https://raw.githubusercontent.com/stonerlab/stonerplots/main/examples/figures/fig05a.png" width=640 alt="Presentation Style Image"/>

Usage
-----

Before using the new styles you need to import stonerplots - but it's ok to just import e.g. the SavedFigure context
manager:

    from stonerplots import SavedFigure

    with SavedFigure("my_figure.pdf", style=["stoner","aps"]):
        plt.figure()
        plt.plot(x,y,label="Dataset")
        ...

The SavedFigure context manager will handle the call to the matplotlib style context manager and will also save any
figures opened within the context manager. If the filename for the figure has an embedded place holder for {ix}, then
multiple figures can be saved without clobbering the filename.

There is also an InsetPlot context manager that can help you get insets placed correctly so that axes
labels don't escape over the edge of the surrounding figure.

    with SavedFigure("my_figure.pdf", style=["stoner","aps"]):
        plt.figure()
        plt.plot(x,y,label="Dataset")
        ...
        with InsetPlot(loc="lower right", width=0.25, height=0.25, padding=0.05) as inset:
            inset.plot(x, model(x, 200), linestyle="--")


See below for the full list of styles and context managers.

Documentation
-------------

Documentation can be found on the [github pages for this repository](https://stonerlab.github.io/stonerplots/index.html).

Available Styles
----------------

 * stoner - this is the base style sheet
 * poster - makes everything bigger for printing on a poster
 * notebook - makes things a little bigger for a Jupyter notebook - from the original scienceplots package
 * presentation - a style suitable for the main graph on a powerpoint slide
 * thesis - a style that tries to look like the CM Physics group LaTeX thesis template

Journal Styles
--------------

 * nature - for Nature group journals - from the original scienceplots package
 * aaas-science - Science single columne style.
 * ieee - for IEEE Transactions journals - from the original scienceplots package
 * aps - for American Physical Society Journals (like Phys Rev Lett etc.)
 * aip - for AIP journals such as Applied Physics Letters - labels in Serif Fonts
 * iop - for Institute of Physics Journals.

Modifiers
---------

 * aps1.5 - Switch to 1.5 column wide format
 * aps2.0 - Switch to 2 column wide format
 * aip2 - Switch to 2 column wide format for AIP journals
 * stoner-dark - Switch to a dark background a lighter plotting colours.
 * hi-res - Switches to 600dpi plotting (but using eps, pdf or svg is generally a better option)
 * presentation_sm - a style for making 1/2 width graphs.
 * presentation_dark - tweak the weight of elements for dark presnetations.
 * science-2col, science-3col - Science 2 and 3 column width figures
 * thesis-sm - reduces the figure width to make the axes closer to 4/3 aspect ratio.

Colour Cycles
-------------

The default colour cycle is based on the London Underground map colour scheme (why not?) and goes

 * Northern
 * Central
 * Picadily
 * District
 * Metropolitan
 * Bakerloo
 * Jubilee
 * Overground
 * Victoria
 * Elizabeth
 * Circle

The package adds these as named colours in matplotlib, along with 90,50,70 and 10% shade variants of some of them. See
the [documentation page on colours](https://stonerlab.github.io/stonerplots/colours.html) for a full list.

Context Managers
----------------

The package is designed to work by using python context managers to aid plotting. These include:

 * SavedFigure - apply style sheets and then save any resulting figures to disc in one or more formats
 * StackVertical - make a multi-panel plot where the panels are arranged in a vertical stack and pushed together so that
   the top-x-axis on one frame is the bottom of the next.
 * MultiPanel - a general; purpose miulti-panel plotting helper.
 * InsetPlot - create an inset set of axes.

This package draws heavily on [scienceplots](https://github.com/garrettj403/SciencePlots), so it seems only fair to cite the original work....

    @article{StonerPlots,
      author       = {John D. Garrett},
      title        = {{garrettj403/SciencePlots}},
      month        = sep,
      year         = 2021,
      publisher    = {Zenodo},
      version      = {1.0.9},
      doi          = {10.5281/zenodo.4106649},
      url          = {http://doi.org/10.5281/zenodo.4106649}
    }

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "StonerPlots",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "matplotlib-style-sheets, matplotlib-figures, scientific-papers, thesis-template, matplotlib-styles, python",
    "author": null,
    "author_email": "Gavin Burnell <G.Burnell@leeds.ac.uk>",
    "download_url": "https://files.pythonhosted.org/packages/d0/38/6fb4d5a884cc28283adf84ea3adb8c1014aad865608125e62595262fd2b5/StonerPlots-1.3.4.tar.gz",
    "platform": null,
    "description": "\ufeff[![GitHub version](https://badge.fury.io/gh/stonerlab%2Fstonerplots.svg)](https://badge.fury.io/gh/stonerlab%2Fstonerplots)\n[![pytest](https://github.com/stonerlab/stonerplots/actions/workflows/pytest.yaml/badge.svg)](https://github.com/stonerlab/stonerplots/actions/workflows/pytest.yaml)\n[![PyPI version](https://badge.fury.io/py/StonerPlots.svg)](https://badge.fury.io/py/StonerPlots)\n[![Build Docs](https://github.com/stonerlab/stonerplots/actions/workflows/publish_sphinx.yaml/badge.svg)](https://stonerlab.github.io/stonerplots/)\n[![Conda](https://github.com/stonerlab/stonerplots/actions/workflows/build_conda.yaml/badge.svg)](https://github.com/stonerlab/stonerplots/actions/workflows/build_conda.yaml)\n[![Conda Version](https://anaconda.org/phygbu/stonerplots/badges/version.svg)](https://anaconda.org/phygbu/stonerplots)\n![Not platform specific](https://anaconda.org/phygbu/stonerplots/badges/platforms.svg)\n![MIT Licensed](https://anaconda.org/phygbu/stonerplots/badges/license.svg)\n[![DOI](https://zenodo.org/badge/776970304.svg)](https://zenodo.org/doi/10.5281/zenodo.10905673)\n\n\nStoner Plots\n=============\n\nStoner Plots is a fork of Science Plots\n\n<img src=\"https://raw.githubusercontent.com/stonerlab/stonerplots/main/examples/figures/fig05a.png\" width=640 alt=\"Presentation Style Image\"/>\n\nUsage\n-----\n\nBefore using the new styles you need to import stonerplots - but it's ok to just import e.g. the SavedFigure context\nmanager:\n\n    from stonerplots import SavedFigure\n\n    with SavedFigure(\"my_figure.pdf\", style=[\"stoner\",\"aps\"]):\n        plt.figure()\n        plt.plot(x,y,label=\"Dataset\")\n        ...\n\nThe SavedFigure context manager will handle the call to the matplotlib style context manager and will also save any\nfigures opened within the context manager. If the filename for the figure has an embedded place holder for {ix}, then\nmultiple figures can be saved without clobbering the filename.\n\nThere is also an InsetPlot context manager that can help you get insets placed correctly so that axes\nlabels don't escape over the edge of the surrounding figure.\n\n    with SavedFigure(\"my_figure.pdf\", style=[\"stoner\",\"aps\"]):\n        plt.figure()\n        plt.plot(x,y,label=\"Dataset\")\n        ...\n        with InsetPlot(loc=\"lower right\", width=0.25, height=0.25, padding=0.05) as inset:\n            inset.plot(x, model(x, 200), linestyle=\"--\")\n\n\nSee below for the full list of styles and context managers.\n\nDocumentation\n-------------\n\nDocumentation can be found on the [github pages for this repository](https://stonerlab.github.io/stonerplots/index.html).\n\nAvailable Styles\n----------------\n\n * stoner - this is the base style sheet\n * poster - makes everything bigger for printing on a poster\n * notebook - makes things a little bigger for a Jupyter notebook - from the original scienceplots package\n * presentation - a style suitable for the main graph on a powerpoint slide\n * thesis - a style that tries to look like the CM Physics group LaTeX thesis template\n\nJournal Styles\n--------------\n\n * nature - for Nature group journals - from the original scienceplots package\n * aaas-science - Science single columne style.\n * ieee - for IEEE Transactions journals - from the original scienceplots package\n * aps - for American Physical Society Journals (like Phys Rev Lett etc.)\n * aip - for AIP journals such as Applied Physics Letters - labels in Serif Fonts\n * iop - for Institute of Physics Journals.\n\nModifiers\n---------\n\n * aps1.5 - Switch to 1.5 column wide format\n * aps2.0 - Switch to 2 column wide format\n * aip2 - Switch to 2 column wide format for AIP journals\n * stoner-dark - Switch to a dark background a lighter plotting colours.\n * hi-res - Switches to 600dpi plotting (but using eps, pdf or svg is generally a better option)\n * presentation_sm - a style for making 1/2 width graphs.\n * presentation_dark - tweak the weight of elements for dark presnetations.\n * science-2col, science-3col - Science 2 and 3 column width figures\n * thesis-sm - reduces the figure width to make the axes closer to 4/3 aspect ratio.\n\nColour Cycles\n-------------\n\nThe default colour cycle is based on the London Underground map colour scheme (why not?) and goes\n\n * Northern\n * Central\n * Picadily\n * District\n * Metropolitan\n * Bakerloo\n * Jubilee\n * Overground\n * Victoria\n * Elizabeth\n * Circle\n\nThe package adds these as named colours in matplotlib, along with 90,50,70 and 10% shade variants of some of them. See\nthe [documentation page on colours](https://stonerlab.github.io/stonerplots/colours.html) for a full list.\n\nContext Managers\n----------------\n\nThe package is designed to work by using python context managers to aid plotting. These include:\n\n * SavedFigure - apply style sheets and then save any resulting figures to disc in one or more formats\n * StackVertical - make a multi-panel plot where the panels are arranged in a vertical stack and pushed together so that\n   the top-x-axis on one frame is the bottom of the next.\n * MultiPanel - a general; purpose miulti-panel plotting helper.\n * InsetPlot - create an inset set of axes.\n\nThis package draws heavily on [scienceplots](https://github.com/garrettj403/SciencePlots), so it seems only fair to cite the original work....\n\n    @article{StonerPlots,\n      author       = {John D. Garrett},\n      title        = {{garrettj403/SciencePlots}},\n      month        = sep,\n      year         = 2021,\n      publisher    = {Zenodo},\n      version      = {1.0.9},\n      doi          = {10.5281/zenodo.4106649},\n      url          = {http://doi.org/10.5281/zenodo.4106649}\n    }\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "This is a fork of scienceplots and provides a range of matplotlib styles for plotting physics...",
    "version": "1.3.4",
    "project_urls": {
        "Homepage": "https://github.com/stonerlab/stonerplots/",
        "Issues": "https://github.com/stonerlab/stonerplots/issues"
    },
    "split_keywords": [
        "matplotlib-style-sheets",
        " matplotlib-figures",
        " scientific-papers",
        " thesis-template",
        " matplotlib-styles",
        " python"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "128fa61f8cc0f99e82913d4943320d911b79c8f6f67f469d358ff741002dedb5",
                "md5": "cee6f51b9fcec9bc4fb7087ac5c7617f",
                "sha256": "b3e7da227f6ecb3e680e7b14539e42c12388156c082a96dea69fb9e4940ab446"
            },
            "downloads": -1,
            "filename": "StonerPlots-1.3.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "cee6f51b9fcec9bc4fb7087ac5c7617f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 32359,
            "upload_time": "2024-04-07T19:29:57",
            "upload_time_iso_8601": "2024-04-07T19:29:57.495675Z",
            "url": "https://files.pythonhosted.org/packages/12/8f/a61f8cc0f99e82913d4943320d911b79c8f6f67f469d358ff741002dedb5/StonerPlots-1.3.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d0386fb4d5a884cc28283adf84ea3adb8c1014aad865608125e62595262fd2b5",
                "md5": "b997d97a3cae36b60d66e273a4becc49",
                "sha256": "57c05b4e70b35af7665ebe138f245f7892195333bf3ae795541ccf97aa17c82d"
            },
            "downloads": -1,
            "filename": "StonerPlots-1.3.4.tar.gz",
            "has_sig": false,
            "md5_digest": "b997d97a3cae36b60d66e273a4becc49",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 2263699,
            "upload_time": "2024-04-07T19:29:59",
            "upload_time_iso_8601": "2024-04-07T19:29:59.454939Z",
            "url": "https://files.pythonhosted.org/packages/d0/38/6fb4d5a884cc28283adf84ea3adb8c1014aad865608125e62595262fd2b5/StonerPlots-1.3.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-07 19:29:59",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "stonerlab",
    "github_project": "stonerplots",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "stonerplots"
}
        
Elapsed time: 0.20634s