[
  {
    "path": ".github/ISSUE_TEMPLATE/01-bug.yml",
    "content": "name: Any Report\ndescription: File a general purpose report\n# title:\nlabels: [\"bug\", \"user question/help\"]\n# assignees:\n\nbody:\n  - type: markdown\n    attributes:\n      value: |\n        Please check it hasn't already been reported in the [issue tracker](../).\n        Thanks for taking the time to fill this out! It really helps us a lot.\n\n  - type: markdown\n    attributes:\n      value: |\n        First of all, let's have a look to your environment: run the following Python code snippet and paste the output below.\n        ```python\n        import platform\n        import sys\n        import subprocess\n        from importlib.metadata import version\n        print('System: ' + platform.platform())\n        print('Python: ' + sys.version)\n        print('SciencePlots: ' + version('scienceplots'))\n        print('Matplotlib: ' + version('matplotlib'))\n        print('LaTeX distro:')\n        subprocess.run([\"latex\", \"-v\"])\n        ```\n\n  - type: textarea\n    id: env\n    attributes:\n      label: Environment\n      description: Paste here the output of the code above\n      placeholder: |\n        System: Windows-10-10.0.19044-SP0\n        Python: 3.10.4 (tags/v3.10.4:9d38120, Mar 23 1984, 24:00:00) [MSC v.1929 64 bit (AMD64)]\n        SciencePlots: 0.0.0\n        Matplotlib: 0.0.0\n        LaTeX distro:\n        pdfTeX 3.141592653589793238-pi (TeX Live 2022)\n        kpathsea version 6.3.4\n        Copyright 2022 Han The Thanh (pdfTeX) et al.\n        There is NO warranty.  Redistribution of this software is\n        covered by the terms of both the pdfTeX copyright and\n        the Lesser GNU General Public License.\n        For more information about these matters, see the file\n        named COPYING and the pdfTeX source.\n        Primary author of pdfTeX: Han The Thanh (pdfTeX) et al.\n        Compiled with libpng 1.6.37; using libpng 1.6.37\n        Compiled with zlib 1.2.11; using zlib 1.2.11\n        Compiled with xpdf version 4.03\n        CompletedProcess(args=['latex', '-v'], returncode=O)\n      # value: \"\"\n      render: \"Python console\"\n    validations:\n      required: true\n\n  - type: textarea\n    id: styles\n    attributes:\n      label: Affected styles\n      description: >\n        List all styles you are using.\n        Do not miss anyone, they may change the behaviour entirely.\n      placeholder: |\n        [\"science\", \"no-latex\"]\n      # value: \"\"\n      render: \"Python console\"\n    validations:\n      required: true\n\n  - type: textarea\n    id: user-description\n    attributes:\n      label: \"Describe the issue here\"\n      # description: \"\"\n      placeholder: \"What do you expect? What happens?\"\n      # value: \"\"\n    validations:\n      required: true\n\n  - type: textarea\n    id: how-to-reproduce\n    attributes:\n      label: \"How can we replicate it? What have you tried? Please, add a reproducible example\"\n      description: \"Paste inline code between backticks [`] and code blocks between 3 [```]\"\n      placeholder: \"Be as accurate as possible, it will help us very much.\"\n      # value: \"\"\n    validations:\n      required: true\n  \n  - type: textarea\n    id: extra\n    attributes:\n      label: \"Extra info\"\n      description: \"Please, specify anything else that may be of help (e.g. links to other issues that may be related anywhere, StackOverflow posts, etc.)\"\n      # placeholder: \"\"\n      # value: \"\"\n    validations:\n      required: false\n"
  },
  {
    "path": ".github/workflows/pytest.yaml",
    "content": "name: Pytest\n\non:\n  push:\n    branches: [ \"master\" ]\n  pull_request:\n    branches: [ \"master\" ]\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    strategy:\n      fail-fast: false\n      matrix:\n        python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\", \"3.x\"]\n\n    steps:\n    - uses: actions/checkout@v5\n    - name: Set up Python ${{ matrix.python-version }}\n      uses: actions/setup-python@v6\n      with:\n        python-version: ${{ matrix.python-version }}\n    - name: Install dependencies\n      run: |\n        python -m pip install --upgrade pip\n        python -m pip install .[test]\n        sudo apt update\n        sudo apt install dvipng texlive-latex-extra texlive-fonts-recommended cm-super\n        sudo apt install fonts-noto-cjk\n    - name: Test with pytest\n      run: |\n        pytest\n"
  },
  {
    "path": ".github/workflows/ruff_check.yaml",
    "content": "name: Ruff Check\n\non:\n    push:\n    pull_request:\n\njobs:\n    ruff-lint:\n        runs-on: ubuntu-latest\n\n        steps:\n            - name: Checkout code\n              uses: actions/checkout@v5\n\n            - name: Set up Python\n              uses: actions/setup-python@v6\n              with:\n                python-version: '3.x'\n\n            - name: Install dependencies\n              run: |\n                  python -m pip install --upgrade pip\n                  pip install ruff\n\n            - name: Run Ruff\n              run: ruff check --output-format=github .\n"
  },
  {
    "path": ".gitignore",
    "content": ".ipynb_checkpoints/\n.DS_STORE\nSciencePlots.egg-info/\n\ndist/\ndev/\n\nTODO.md\nnew-version.md\n\n# Byte-compiled / optimized / DLL files\n__pycache__/\n*.py[cod]\n*$py.class\n\n# C extensions\n*.so\n\n# Distribution / packaging\n.Python\nbuild/\ndevelop-eggs/\ndist/\ndownloads/\neggs/\n.eggs/\nlib/\nlib64/\nparts/\nsdist/\nvar/\nwheels/\nshare/python-wheels/\n*.egg-info/\n.installed.cfg\n*.egg\nMANIFEST\n\n# PyInstaller\n#  Usually these files are written by a python script from a template\n#  before PyInstaller builds the exe, so as to inject date/other infos into it.\n*.manifest\n*.spec\n\n# Installer logs\npip-log.txt\npip-delete-this-directory.txt\n\n# Unit test / coverage reports\nhtmlcov/\n.tox/\n.nox/\n.coverage\n.coverage.*\n.cache\nnosetests.xml\ncoverage.xml\n*.cover\n*.py,cover\n.hypothesis/\n.pytest_cache/\ncover/\n\n# Translations\n*.mo\n*.pot\n\n# Django stuff:\n*.log\nlocal_settings.py\ndb.sqlite3\ndb.sqlite3-journal\n\n# Flask stuff:\ninstance/\n.webassets-cache\n\n# Scrapy stuff:\n.scrapy\n\n# Sphinx documentation\ndocs/_build/\n\n# PyBuilder\n.pybuilder/\ntarget/\n\n# Jupyter Notebook\n.ipynb_checkpoints\n\n# IPython\nprofile_default/\nipython_config.py\n\n# pyenv\n#   For a library or package, you might want to ignore these files since the code is\n#   intended to run in multiple environments; otherwise, check them in:\n# .python-version\n\n# pipenv\n#   According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.\n#   However, in case of collaboration, if having platform-specific dependencies or dependencies\n#   having no cross-platform support, pipenv may install dependencies that don't work, or not\n#   install all needed dependencies.\n#Pipfile.lock\n\n# poetry\n#   Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.\n#   This is especially recommended for binary packages to ensure reproducibility, and is more\n#   commonly ignored for libraries.\n#   https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control\n#poetry.lock\n\n# pdm\n#   Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.\n#pdm.lock\n#   pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it\n#   in version control.\n#   https://pdm.fming.dev/#use-with-ide\n.pdm.toml\n\n# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm\n__pypackages__/\n\n# Celery stuff\ncelerybeat-schedule\ncelerybeat.pid\n\n# SageMath parsed files\n*.sage.py\n\n# Environments\n.env\n.venv\nenv/\nvenv/\nENV/\nenv.bak/\nvenv.bak/\n\n# Spyder project settings\n.spyderproject\n.spyproject\n\n# Rope project settings\n.ropeproject\n\n# mkdocs documentation\n/site\n\n# mypy\n.mypy_cache/\n.dmypy.json\ndmypy.json\n\n# Pyre type checker\n.pyre/\n\n# pytype static type analyzer\n.pytype/\n\n# Cython debug symbols\ncython_debug/\n\n# PyCharm\n#  JetBrains specific template is maintained in a separate JetBrains.gitignore that can\n#  be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore\n#  and can be added to the global gitignore or merged into this file.  For a more nuclear\n#  option (not recommended) you can uncomment the following to ignore the entire idea folder.\n#.idea/\n"
  },
  {
    "path": "CHANGES.md",
    "content": "v2.2.1 (xx-yyy-2026)\n====================\nMaintenance\n-----------\n- Mitigate packaging issue where styles are not included in local bdist when `.git` folder is not present.\n  Affected users exclusively are those building the wheel by themselves from a version repo source file, e.g., via AUR.\n  See issue 151: https://github.com/garrettj403/SciencePlots/issues/151\n\nv2.2.0 (20-Nov-2025)\n====================\nNew features\n------------\n- Fix `['science', 'no-latex']` font does not work with symbols (e.g. degree symbol)\n  This style set was found to be incompatible with _Cartopy_.\n- Add all 23 \"discrete rainbow\" styles proposed by Paul Tol on his website (by @IchBinGROOT)\n  Access them with the style names `discrete-rainbow-1`, `discrete-rainbow-2`, ..., `discrete-rainbow-23`\n- Update `README.md` to reflect that _Install from `conda-forge` is now available!_\n\nMaintenance\n-----------\n- Update Paul Tol's webpage link to https://sronpersonalpages.nl/~pault/ in relevant comments through the project.\n- Improve `turkish-font.mplstyle` (may add some breaking changes)\n   1. `:` and `!` are now interpreted as text by default, not as control characters.\n   2. Assume UTF-8 encoding by default.\n   3. Enhance compatibility, especially with T1 font encoding, by using the package `lmodern`.\n- Now all subdirectories of the ``styles`` folder are parsed for styles, instead of just the first two levels.\n- Upgrade & unify issue templates.\n\nv2.1.1 (25-Nov-2023)\n====================\n- Avoid Matplotlib issuing `INFO` log statements about no available fonts\n  due to last release changes.\n- Add `science` + `no-latex ` example\n\nv2.1.0 (30-May-2023)\n====================\n- Change `science` and `ieee` to use Times New Roman look-alike fonts\n- Tweak `plot-examples.py` and clean PDF output\n\nv2.0.1 (03-Dec-2022)\n====================\n- Add Turkish `turkish-font` language style\n\nv2.0.0 (21-Nov-2022)\n====================\n- Fix import on case sensitive OSs\n- Finally bump to this version, following breaking change of distribution\n\nv1.1.0 (07-Nov-2022)\n====================\n- Major change in distribution system\n  - Now needs import directive `import scienceplots`\n- Fix not using raw string in `plot-example.py`\n- Update README\n\nv1.0.9 (16-Sep-2021)\n====================\n\n- `notebook`:\n   - make Latex fonts sans-serif\n- Fix bug with Latex packages:\n   - e.g., `\\usepackage{amsmath, amssymb, sfmath}` --> `\\usepackage{amsmath} \\usepackage{amssymb} \\usepackage{sfmath}`\n- Add `pyproject.toml` file (see PEP 517/518)\n- Minor updates to README, including adding more papers to publication list\n\nv1.0.8 (02-Jun-2021)\n====================\n\n- ``nature``:\n   - Added style for Nature articles\n   - Uses sans-serif fonts\n- ``latex-sans``:\n   - Added style for using LaTeX with sans-serif fonts\n- ``std-colors``:\n   - Added style to recover the standard color cycle of the SciencePlots package\n   - For example, if you use ``plt.style.use([\"science\", \"ieeee\"]). The figure will use the ``\"ieee\"`` color cycle. To revert to the standard color cycle, you can use ``plt.style.use([\"science\", \"ieee\", \"std-colors\"])``.\n- ``science``:\n   - Added ``amssymb`` to LaTeX preamble\n- ``grid``: \n   - Set ``axes.axisbelow`` to True\n- Minor updates to README\n\nv1.0.7 (28-Feb-2021)\n====================\n\n- Add support for CJK fonts:\n   - see README for details\n- Add example of CJK fonts:\n   - see Fig 14a, Fig 14b, Fig 14c, Fig 14d\n- ``science`` style:\n   - use default serif font\n- ``ieee`` style: \n   - use Times font\n- ``grid`` style:\n   - change line style to '--'\n- README:\n   - add badge for Zenodo reference\n   - add info on citing SciencePlots\n   - add info on using Times New Roman\n   - add more papers using SciencePlots\n   \nv1.0.6 (19-Oct-2020)\n====================\n\n- The main reason for this release is to trigger Zenodo:\n   - I've added SciencePlots to Zenodo (an archiving service).\n   - It only archives after new releases, so I will make a trivial version bump.\n- Trivial changes to README:\n   - Added installation info for Google Colab, Jupyter Notebooks, etc.\n   - Added PyPI badge\n   - Added more papers to list\n\nv1.0.5 (8-Sep-2020)\n===================\n\n- New color blind safe color cycles (``high-contrast.mplstyle``, ``light.mplstyle``). Taken from [Paul Tol's website](https://personal.sron.nl/~pault/).\n- Fixed color order in ``muted.mplstyle``, ``vibrant.mplstyle``, and ``bright.mplstyle``.\n\nv1.0.4 (14-Aug-2020)\n====================\n\n- New style: ``grid``\n   - this will add grid lines\n- ``science`` style:\n   - use a serif font with mathtex\n- README:\n   - Add example of the ``notebook`` style\n   - Add FAQ\n   - Update publications\n   - Other misc changes...\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2018 John Garrett\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE."
  },
  {
    "path": "MANIFEST.in",
    "content": "# https://setuptools.pypa.io/en/latest/userguide/miscellaneous.html#controlling-files-in-the-distribution (accessed on 2026-02-20)\n# By default 'setuptools_scm' includes all git-tracked files (all .py files are included by default by 'setuptools')\n# In sdist downloads, .git is non existent.  Ref: https://github.com/garrettj403/SciencePlots/issues/151\n# Required data files are exhaustively listed here:\nrecursive-include src/scienceplots/styles *.mplstyle\ninclude CHANGES.md\ninclude LICENSE\ninclude MANIFEST.in\ninclude pyproject.toml\ninclude README.md\n\n# Clean unnecessary files in source distribution:\nprune .github\nprune .git\nprune examples\n"
  },
  {
    "path": "README.md",
    "content": "Science Plots\n=============\n\n<p align=\"left\">\n    <table>\n        <tr>\n            <td style=\"text-align: center;\">PyPI version</td>\n            <td style=\"text-align: center;\">\n                <a href=\"https://badge.fury.io/py/SciencePlots\">\n                    <img src=\"https://badge.fury.io/py/SciencePlots.svg\" alt=\"PyPI version\" height=\"18\"/>\n                </a>\n            </td>\n        </tr>\n        <tr>\n            <td style=\"text-align: center;\">conda-forge version</td>\n            <td style=\"text-align: center;\">\n                <a href=\"https://anaconda.org/conda-forge/scienceplots\">\n                    <img src=\"https://anaconda.org/conda-forge/scienceplots/badges/version.svg\" alt=\"conda-forge version\" height=\"18\"/>\n                </a>\n            </td>\n        </tr>\n        <tr>\n            <td style=\"text-align: center;\">DOI</td>\n            <td style=\"text-align: center;\">\n                <a href=\"https://zenodo.org/badge/latestdoi/144605189\">\n                    <img src=\"https://zenodo.org/badge/144605189.svg\" alt=\"DOI\" height=\"18\"/>\n                </a>\n            </td>\n        </tr>\n    </table>\n</p>\n\n> **Warning**\n> : As of version 2.0.0, you need to add `import scienceplots` before setting the style (`plt.style.use('science')`).\n\n*Matplotlib styles for scientific figures*\n\nThis repo has Matplotlib styles to format your figures for scientific papers, presentations and theses.\n\n<p align=\"center\">\n<img src=\"https://github.com/garrettj403/SciencePlots/raw/master/examples/figures/fig01a.jpg\" width=\"500\">\n</p>\n\nYou can find [the full gallery of included styles here](https://github.com/garrettj403/SciencePlots/wiki/Gallery).\n\nGetting Started\n---------------\n\nThe easiest way to install SciencePlots is by using `pip`:\n\n```bash\n# to install the latest release (from PyPI)\npip install SciencePlots\n\n# to install the latest release (using Conda)\nconda install -c conda-forge scienceplots\n\n# to install the latest commit (from GitHub)\npip install git+https://github.com/garrettj403/SciencePlots\n\n# to clone and install from a local copy\ngit clone https://github.com/garrettj403/SciencePlots.git\ncd SciencePlots\npip install -e .\n```\n\nFrom version `v1.1.0` on, `import scienceplots` is needed on top of your scripts so Matplotlib can make use of the styles.\n\n**Notes:** \n- SciencePlots requires Latex ([see Latex installation instructions](https://github.com/garrettj403/SciencePlots/wiki/FAQ#installing-latex)). \n- If you would like to use CJK fonts, you will need to install these font separately ([see CJK font installation instructions](https://github.com/garrettj403/SciencePlots/wiki/FAQ#installing-cjk-fonts)).\n\nPlease see the [FAQ](https://github.com/garrettj403/SciencePlots/wiki/FAQ) for more information and troubleshooting.\n\nUsing the Styles\n----------------\n\n``\"science\"`` is the primary style in this repo. Whenever you want to use it, simply add the following to the top of your python script:\n\n```python\nimport matplotlib.pyplot as plt\nimport scienceplots\n\nplt.style.use('science')\n```\n\nYou can also combine multiple styles together by:\n\n```python\nplt.style.use(['science','ieee'])\n```\n\nIn this case, the ``ieee`` style will override some of the parameters from the ``science`` style in order to configure the plot for IEEE papers (column width, fontsizes, etc.).\n\nTo use any of the styles temporarily, you can use:\n\n```python\nwith plt.style.context('science'):\n    plt.figure()\n    plt.plot(x, y)\n    plt.show()\n```\n\nExamples\n--------\n\nThe basic ``science`` style is shown below:\n\n<img src=\"https://github.com/garrettj403/SciencePlots/raw/master/examples/figures/fig01a.jpg\" width=\"500\">\n\nIt can be cascaded with other styles to fine-tune the appearance. For example, the ``science`` + ``notebook`` styles (intended for Jupyter notebooks):\n\n<img src=\"https://github.com/garrettj403/SciencePlots/raw/master/examples/figures/fig10.jpg\" width=\"500\">\n\nPlease see [the project Wiki](https://github.com/garrettj403/SciencePlots/wiki/Gallery) for a full list of available styles.\n\nSpecific Styles for Academic Journals\n-------------------------------------\n\nThe ``science`` + ``ieee`` styles for IEEE papers:\n\n<img src=\"https://github.com/garrettj403/SciencePlots/raw/master/examples/figures/fig02a.jpg\" width=\"500\">\n\n   - IEEE requires figures to be readable when printed in black and white. The ``ieee`` style also sets the figure width to fit within one column of an IEEE paper.\n\nThe ``science`` + ``nature`` styles for Nature articles:\n\n<img src=\"https://github.com/garrettj403/SciencePlots/raw/master/examples/figures/fig02c.jpg\" width=\"500\">\n\n   - Nature recommends sans-serif fonts.\n\nOther languages\n---------------\n\nSciencePlots currently supports:\n * [Traditional Chinese](https://github.com/garrettj403/SciencePlots/wiki/Gallery#traditional-chinese)\n * [Simplified Chinese](https://github.com/garrettj403/SciencePlots/wiki/Gallery#simplified-chinese)\n * [Japanese](https://github.com/garrettj403/SciencePlots/wiki/Gallery#japanese)\n * [Korean](https://github.com/garrettj403/SciencePlots/wiki/Gallery#korean)\n * [Russian](https://github.com/garrettj403/SciencePlots/wiki/Gallery#russian)\n * [Turkish](https://github.com/garrettj403/SciencePlots/wiki/Gallery#turkish)\n\nExample: Traditional Chinese (`science` + `no-latex` + `cjk-tc-font`):\n\n<img src=\"https://github.com/garrettj403/SciencePlots/raw/master/examples/figures/fig14a.jpg\" width=\"500\">\n\nSee the [FAQ](https://github.com/garrettj403/SciencePlots/wiki/FAQ#installing-cjk-fonts) for information on installing CJK fonts.\n\nOther color cycles\n------------------\n\nSciencePlots comes with a variety of different color cycles. For a full list, [see the project Wiki](https://github.com/garrettj403/SciencePlots/wiki/Gallery#color-cycles). Two examples are shown below.\n\nThe ``bright`` color cycle (color blind safe):\n\n<img src=\"https://github.com/garrettj403/SciencePlots/raw/master/examples/figures/fig06.jpg\" width=\"500\">\n\nThe ``high-vis`` color cycle:\n\n<img src=\"https://github.com/garrettj403/SciencePlots/raw/master/examples/figures/fig04.jpg\" width=\"500\">\n\nPaul Tol's discrete rainbow color sets are available as well, with the style identifier ``discrete-rainbow-<n>``, where ``<n>`` is the number of unique colors. ``<n>`` ranges from ``1`` to ``23`` (inclusive). For example, ``discrete-rainbow-15``:\n\n<img src=\"https://github.com/garrettj403/SciencePlots/raw/master/examples/figures/fig_dr_15.jpg\" width=\"500\">\n\nHelp and Contributing\n---------------------\n\nPlease feel free to contribute to the SciencePlots repo! For example, it would be good to add new styles for different journals and add new color cycles. Before starting a new style or making any changes, please create an issue through the [GitHub issue tracker](https://github.com/garrettj403/SciencePlots/issues). That way we can discuss if the changes are necessary and the best approach.\n\nIf you need any help with SciencePlots, please first check the [FAQ](https://github.com/garrettj403/SciencePlots/wiki/FAQ) and search through the [previous GitHub issues](https://github.com/garrettj403/SciencePlots/issues). If you can't find an answer, create a new issue through the [GitHub issue tracker](https://github.com/garrettj403/SciencePlots/issues).\n\nYou can checkout [Matplotlib's documentation](https://matplotlib.org/tutorials/introductory/customizing.html) for more information on plotting settings.\n\nFAQ\n---\n\nYou can find [the FAQ in the project Wiki.](https://github.com/garrettj403/SciencePlots/wiki/FAQ)\n\nSciencePlots in Academic Papers\n-------------------------------\n\nThe following papers use ``SciencePlots``:\n\n- C.-S. Li, S.-P. Ma, and T.-H. Lin, [\"FMSA: A Universal Microservice Architecture Based on FHIR Medical Informatics Standard,\"](https://ieeexplore.ieee.org/document/11326732) 2025 Second International Conference on Artificial Intelligence for Medicine, Health and Care (AIxMHC), pp. 42–49, Oct. 2025.\n\n- Keçeci, Mehmet. \"Scalable Complexity: Mathematical Analysis and Potential for Physical Applications of the Keçeci Circle Fractal\", 13 May 2025. https://doi.org/10.5281/zenodo.15396198. (Reference has been made to the module \"SciencePlots\".)\n\n- J. D. Garrett, C.-Y. E. Tong, L. Zeng, T.-J. Chen and M.-J. Wang, [\"A 345 GHz Sideband-Separating Receiver Prototype with Ultra-Wide Instantaneous Bandwidth,\"](https://ieeexplore.ieee.org/document/10089556) *IEEE Trans. THz Sci. Technol.*, vol. 13, no. 3, pp. 237-245, Mar. 2023.\n\n- J. Garrett, B.-K. Tan, C. Chaumont, F. Boussaha, and G. Yassin, [\"A 230-GHz Endfire SIS Mixer With Near Quantum-Limited Performance,\"](https://ieeexplore.ieee.org/document/9833810) *IEEE Microw. Wirel. Compon. Lett.*, Jul. 2022. ([open access](https://ora.ox.ac.uk/objects/uuid:59a100bf-c997-499a-be20-01fc66fffe2b))\n\n- J. Garrett, and E. Tong, [\"Measuring Cryogenic Waveguide Loss in the Terahertz Regime,\"](https://ieeexplore.ieee.org/document/9727077) *IEEE Trans. THz Sci. Technol.*, vol. 12, no. 3, pp. 293-299, May 2022.\n\n- Y. Liu, X. Liu, and Y. Sun, [\"QGrain: An open-source and easy-to-use software for the comprehensive analysis of grain size distributions\"](https://doi.org/10.1016/j.sedgeo.2021.105980), *Sedimentary Geology*, vol. 423, 105980, Aug. 2021.\n\n- M. Gasanov, *et al.*, [\"A New Multi-objective Approach to Optimize Irrigation Using a Crop Simulation Model and Weather History\"](https://link.springer.com/chapter/10.1007/978-3-030-77970-2_7) in *Computational Science–ICCS 2021*, Krakow, Poland, Jun. 2021, pp. 75-88. ([open access](https://www.researchgate.net/profile/Sergey-Matveev-5/publication/352285985_A_New_Multi-objective_Approach_to_Optimize_Irrigation_Using_a_Crop_Simulation_Model_and_Weather_History/links/60e74b88b8c0d5588ce2da07/A-New-Multi-objective-Approach-to-Optimize-Irrigation-Using-a-Crop-Simulation-Model-and-Weather-History.pdf))\n\n- J. Garrett, and E. Tong, [\"A Dispersion-Compensated Algorithm for the Analysis of Electromagnetic Waveguides,\"](https://ieeexplore.ieee.org/document/9447194) *IEEE Signal Process. Lett.*, vol. 28, pp. 1175-1179, Jun. 2021.\n\n- G. Jegannathan, *et al.*, [\"Current-Assisted SPAD with Improved p-n Junction and Enhanced NIR Performance\"](https://www.mdpi.com/1424-8220/20/24/7105), *Sensors*, Dec 2020. ([open access](https://www.mdpi.com/1424-8220/20/24/7105))\n\n- H. Tian, *et al.*, [\"ivis Dimensionality Reduction Framework for Biomacromolecular Simulations\"](https://pubs.acs.org/doi/abs/10.1021/acs.jcim.0c00485), *J. Chem. Inf. Model.*, Aug 2020. ([open access](https://arxiv.org/pdf/2004.10718.pdf))\n\n- P. Stoltz, *et al.*, [\"A new simple algorithm for space charge limited emission,\"](https://aip.scitation.org/doi/10.1063/5.0020781) *Phys. Plasmas*, vol. 27, no. 9, pp. 093103, Sep. 2020. ([open access](https://aip.scitation.org/doi/10.1063/5.0020781))\n\n- J. Garrett, *et al.*, [\"A Nonlinear Transmission Line Model for Simulating Distributed SIS Frequency Multipliers,\"](https://ieeexplore.ieee.org/abstract/document/9050728)  *IEEE Trans. THz Sci. Technol.*, vol. 10, no. 3, pp. 246-255, May 2020. ([open access](https://ora.ox.ac.uk/objects/uuid:5ca31c2c-a984-462c-b21a-3fe16eee0d9b/download_file?safe_filename=XXXX_final_JohnGarrett.pdf&type_of_work=Journal+article))\n\n- J. Garrett, *et al.*, [\"Simulating the Behavior of a 230 GHz SIS Mixer Using Multi-Tone Spectral Domain Analysis,\"](https://ieeexplore.ieee.org/document/8822760/) *IEEE Trans. THz Sci. Technol.*, vol. 9, no. 9, pp. 540-548, Nov. 2019. ([open access](https://ora.ox.ac.uk/objects/uuid:0fd4537d-258c-454a-bbfb-09b1bcd88d49/download_file?file_format=pdf&safe_filename=XXXX_final.pdf&type_of_work=Journal+article))\n\n- J. Garrett, *et al.*, [\"A Compact and Easy to Fabricate E-plane Waveguide Bend,\"](https://ieeexplore.ieee.org/document/8760521) *IEEE Microw. Wireless Compon. Lett.*, vol. 29, no. 8, pp. 529-531, Aug. 2019. ([open access](https://ora.ox.ac.uk/objects/uuid:496855f9-be2a-47cd-b498-1753d8033f50/download_file?file_format=pdf&safe_filename=Waveguide_Bend__IEEE_MWCL_.pdf&type_of_work=Journal+article))\n\n- J. Garrett, [\"A 230 GHz Focal Plane Array Using a Wide IF Bandwidth SIS Receiver,\"](https://ora.ox.ac.uk/objects/uuid:d47fbf3b-1cf3-4e58-be97-767b9893066e/download_file?file_format=pdf&safe_filename=GarrettJ_DPhilThesis.pdf&type_of_work=Thesis) DPhil thesis, University of Oxford, Oxford, UK, 2018. ([open access](https://ora.ox.ac.uk/objects/uuid:d47fbf3b-1cf3-4e58-be97-767b9893066e/download_file?file_format=pdf&safe_filename=GarrettJ_DPhilThesis.pdf&type_of_work=Thesis))\n\nIf you use ``SciencePlots`` in your paper/thesis, feel free to add it to the list!\n\nCiting SciencePlots\n-------------------\n\nYou don't have to cite SciencePlots if you use it but it's nice if you do:\n\n    @article{SciencePlots,\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"
  },
  {
    "path": "examples/plot-examples.py",
    "content": "\"\"\"Plot examples of SciencePlot styles.\"\"\"\n\n# %%\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport scienceplots  # noqa: F401\n\nimport os\n\n# Check we are in examples dir\ncurrent_dir = os.getcwd().lower()\nif current_dir.endswith(\"scienceplots\"):\n    os.chdir(\"./examples\")\n# Create 'figures' folder if it does not exist\nif not os.path.exists(\"./figures\"):\n    os.makedirs(\"figures\")\n\n\ndef model(x, p):\n    return x ** (2 * p + 1) / (1 + x ** (2 * p))\n\n\npparam = dict(xlabel=\"Voltage (mV)\", ylabel=r\"Current ($\\mu$A)\")\n\nx = np.linspace(0.75, 1.25, 201)\n\n\n# %%\n# Style 'science'\n\nwith plt.style.context([\"science\"]):\n    fig, ax = plt.subplots()\n    for p in [10, 15, 20, 30, 50, 100]:\n        ax.plot(x, model(x, p), label=p)\n    ax.legend(title=\"Order\")\n    ax.autoscale(tight=True)\n    ax.set(**pparam)\n    fig.savefig(\"figures/fig01a.jpg\", dpi=300)\n    plt.close()\n\n# %%\n# Styles 'science', 'no-latex'\nwith plt.style.context([\"science\", \"no-latex\"]):\n    fig, ax = plt.subplots()\n    for p in [10, 15, 20, 30, 50, 100]:\n        ax.plot(x, model(x, p), label=p)\n    ax.legend(title=\"Order\")\n    ax.autoscale(tight=True)\n    ax.set(**pparam)\n    fig.savefig(\"figures/fig01b.jpg\", dpi=300)\n    plt.close()\n\n# %%\n# Styles 'science', 'ieee'\nwith plt.style.context([\"science\", \"ieee\"]):\n    fig, ax = plt.subplots()\n    for p in [10, 20, 40, 100]:\n        ax.plot(x, model(x, p), label=p)\n    ax.legend(title=\"Order\")\n    ax.autoscale(tight=True)\n    ax.set(**pparam)\n    fig.savefig(\"figures/fig02a.jpg\", dpi=300)\n    plt.close()\n\n\n# %%\n# Styles 'science', 'ieee', 'std-colors'\nwith plt.style.context([\"science\", \"ieee\", \"std-colors\"]):\n    fig, ax = plt.subplots()\n    for p in [10, 15, 20, 30, 50, 100]:\n        ax.plot(x, model(x, p), label=p)\n    ax.legend(title=\"Order\")\n    ax.autoscale(tight=True)\n    ax.set(**pparam)\n    fig.savefig(\"figures/fig02b.jpg\", dpi=300)\n    plt.close()\n\n# %%\n# Styles 'science', 'nature'\nwith plt.style.context([\"science\", \"nature\"]):\n    fig, ax = plt.subplots()\n    for p in [10, 15, 20, 30, 50, 100]:\n        ax.plot(x, model(x, p), label=p)\n    ax.legend(title=\"Order\")\n    ax.autoscale(tight=True)\n    ax.set(**pparam)\n    fig.savefig(\"figures/fig02c.jpg\", dpi=300)\n    plt.close()\n\n# %%\n# Styles 'science', 'scatter'\nwith plt.style.context([\"science\", \"scatter\"]):\n    fig, ax = plt.subplots(figsize=(4, 4))\n    ax.plot([-2, 2], [-2, 2], \"k--\")\n    ax.fill_between(\n        [-2, 2], [-2.2, 1.8], [-1.8, 2.2], color=\"dodgerblue\", alpha=0.2, lw=0\n    )\n    for i in range(7):\n        x1 = np.random.normal(0, 0.5, 10)\n        y1 = x1 + np.random.normal(0, 0.2, 10)\n        ax.plot(x1, y1, label=r\"$^\\#${}\".format(i + 1))\n    lgd = r\"$\\mathring{P}=\\begin{cases}1&\\text{if $\\nu\\geq0$}\\\\0&\\text{if $\\nu<0$}\\end{cases}$\"\n    ax.legend(title=lgd, loc=2, ncol=2)\n    xlbl = r\"$\\log_{10}\\left(\\frac{L_\\mathrm{IR}}{\\mathrm{L}_\\odot}\\right)$\"\n    ylbl = r\"$\\log_{10}\\left(\\frac{L_\\circledast}{\\mathrm{L}_\\odot}\\right)$\"\n    ax.set_xlabel(xlbl)\n    ax.set_ylabel(ylbl)\n    ax.set_xlim([-2, 2])\n    ax.set_ylim([-2, 2])\n    fig.savefig(\"figures/fig03.jpg\", dpi=300)\n    plt.close()\n\n# %%\n# Styles 'science', 'high-vis'\nwith plt.style.context([\"science\", \"high-vis\"]):\n    fig, ax = plt.subplots()\n    for p in [10, 15, 20, 30, 50, 100]:\n        ax.plot(x, model(x, p), label=p)\n    ax.legend(title=\"Order\")\n    ax.autoscale(tight=True)\n    ax.set(**pparam)\n    fig.savefig(\"figures/fig04.jpg\", dpi=300)\n    plt.close()\n\n# %%\n# Styles 'dark_background', 'science', 'high-vis'\nwith plt.style.context([\"dark_background\", \"science\", \"high-vis\"]):\n    fig, ax = plt.subplots()\n    for p in [10, 15, 20, 30, 50, 100]:\n        ax.plot(x, model(x, p), label=p)\n    ax.legend(title=\"Order\")\n    ax.autoscale(tight=True)\n    ax.set(**pparam)\n    fig.savefig(\"figures/fig05.jpg\", dpi=300)\n    plt.close()\n\n# %%\n# Styles 'science', 'notebook'\nwith plt.style.context([\"science\", \"notebook\"]):\n    fig, ax = plt.subplots()\n    for p in [10, 15, 20, 30, 50, 100]:\n        ax.plot(x, model(x, p), label=p)\n    ax.legend(title=\"Order\")\n    ax.autoscale(tight=True)\n    ax.set(**pparam)\n    fig.savefig(\"figures/fig10.jpg\", dpi=300)\n    plt.close()\n\n# %%\n# Plot different color cycles\n\n# %%\n# Styles 'science', 'bright'\nwith plt.style.context([\"science\", \"bright\"]):\n    fig, ax = plt.subplots()\n    for p in [5, 10, 15, 20, 30, 50, 100]:\n        ax.plot(x, model(x, p), label=p)\n    ax.legend(title=\"Order\")\n    ax.autoscale(tight=True)\n    ax.set(**pparam)\n    fig.savefig(\"figures/fig06.jpg\", dpi=300)\n    plt.close()\n\n# %%\n# Styles 'science', 'vibrant'\nwith plt.style.context([\"science\", \"vibrant\"]):\n    fig, ax = plt.subplots()\n    for p in [5, 10, 15, 20, 30, 50, 100]:\n        ax.plot(x, model(x, p), label=p)\n    ax.legend(title=\"Order\")\n    ax.autoscale(tight=True)\n    ax.set(**pparam)\n    fig.savefig(\"figures/fig07.jpg\", dpi=300)\n    plt.close()\n\n# %%\n# Styles 'science', 'muted'\nwith plt.style.context([\"science\", \"muted\"]):\n    fig, ax = plt.subplots()\n    for p in [5, 7, 10, 15, 20, 30, 38, 50, 100, 500]:\n        ax.plot(x, model(x, p), label=p)\n    ax.legend(title=\"Order\", fontsize=7)\n    ax.autoscale(tight=True)\n    ax.set(**pparam)\n    fig.savefig(\"figures/fig08.jpg\", dpi=300)\n    plt.close()\n\n# %%\n# Styles 'science', 'retro'\nwith plt.style.context([\"science\", \"retro\"]):\n    fig, ax = plt.subplots()\n    for p in [10, 15, 20, 30, 50, 100]:\n        ax.plot(x, model(x, p), label=p)\n    ax.legend(title=\"Order\")\n    ax.autoscale(tight=True)\n    ax.set(**pparam)\n    fig.savefig(\"figures/fig09.jpg\", dpi=300)\n    plt.close()\n\n# %%\n# Styles 'science', 'grid'\nwith plt.style.context([\"science\", \"grid\"]):\n    fig, ax = plt.subplots()\n    for p in [10, 15, 20, 30, 50, 100]:\n        ax.plot(x, model(x, p), label=p)\n    ax.legend(title=\"Order\")\n    ax.autoscale(tight=True)\n    ax.set(**pparam)\n    fig.savefig(\"figures/fig11.jpg\", dpi=300)\n    plt.close()\n\n# %%\n# Styles 'science', 'high-contrast'\nwith plt.style.context([\"science\", \"high-contrast\"]):\n    fig, ax = plt.subplots()\n    for p in [10, 20, 50]:\n        ax.plot(x, model(x, p), label=p)\n    ax.legend(title=\"Order\")\n    ax.autoscale(tight=True)\n    ax.set(**pparam)\n    fig.savefig(\"figures/fig12.jpg\", dpi=300)\n    plt.close()\n\n# %%\n# Styles 'science', 'light'\nwith plt.style.context([\"science\", \"light\"]):\n    fig, ax = plt.subplots()\n    for p in [5, 7, 10, 15, 20, 30, 38, 50, 100]:\n        ax.plot(x, model(x, p), label=p)\n    ax.legend(title=\"Order\", fontsize=7)\n    ax.autoscale(tight=True)\n    ax.set(**pparam)\n    fig.savefig(\"figures/fig13.jpg\", dpi=300)\n    plt.close()\n\n# %%\n# Styles for CJK languages\n# Note: You need to install the Noto Serif CJK Fonts before running\n# examples 14 and 15. See FAQ in README.\n\n# %%\n# Styles 'science', 'no-latex', 'cjk-*-font'\nwith plt.style.context([\"science\", \"no-latex\", \"cjk-tc-font\"]):\n    fig, ax = plt.subplots()\n    for p in [5, 7, 10, 15, 20, 30, 38, 50, 100]:\n        ax.plot(x, model(x, p), label=p)\n    ax.legend(title=\"Order\", fontsize=7)\n    ax.set(xlabel=r\"電壓 (mV)\")\n    ax.set(ylabel=r\"電流 ($\\mu$A)\")\n    ax.autoscale(tight=True)\n    fig.savefig(\"figures/fig14a.jpg\", dpi=300)\n    plt.close()\n\nwith plt.style.context([\"science\", \"no-latex\", \"cjk-sc-font\"]):\n    fig, ax = plt.subplots()\n    for p in [5, 7, 10, 15, 20, 30, 38, 50, 100]:\n        ax.plot(x, model(x, p), label=p)\n    ax.legend(title=\"Order\", fontsize=7)\n    ax.set(xlabel=r\"电压 (mV)\")\n    ax.set(ylabel=r\"电流 ($\\mu$A)\")\n    ax.autoscale(tight=True)\n    fig.savefig(\"figures/fig14b.jpg\", dpi=300)\n    plt.close()\n\nwith plt.style.context([\"science\", \"no-latex\", \"cjk-jp-font\"]):\n    fig, ax = plt.subplots()\n    for p in [5, 7, 10, 15, 20, 30, 38, 50, 100]:\n        ax.plot(x, model(x, p), label=p)\n    ax.legend(title=\"Order\", fontsize=7)\n    ax.set(xlabel=r\"電圧 (mV)\")\n    ax.set(ylabel=r\"電気 ($\\mu$A)\")\n    ax.autoscale(tight=True)\n    fig.savefig(\"figures/fig14c.jpg\", dpi=300)\n    plt.close()\n\nwith plt.style.context([\"science\", \"no-latex\", \"cjk-kr-font\"]):\n    fig, ax = plt.subplots()\n    for p in [5, 7, 10, 15, 20, 30, 38, 50, 100]:\n        ax.plot(x, model(x, p), label=p)\n    ax.legend(title=\"Order\", fontsize=7)\n    ax.set(xlabel=r\"전압 (mV)\")\n    ax.set(ylabel=r\"전류 ($\\mu$A)\")\n    ax.autoscale(tight=True)\n    fig.savefig(\"figures/fig14d.jpg\", dpi=300)\n    plt.close()\n\n# import matplotlib\n# matplotlib.use('pgf')  # stwich backend to pgf\n# matplotlib.rcParams.update({\n#     \"pgf.preamble\": [\n#         \"\\\\usepackage{fontspec}\",\n#         '\\\\usepackage{xeCJK}',\n#         r'\\setmainfont{Times New Roman}',  # EN fonts Romans\n#         r'\\setCJKmainfont{SimHei}',  # set CJK fonts as SimSun\n#         r'\\setCJKsansfont{SimHei}',\n#         r'\\newCJKfontfamily{\\Song}{SimSun}',\n#         ]\n# })\n\n# with plt.style.context(['science', 'cjk-tc-font']):\n#     fig, ax = plt.subplots()\n#     for p in [5, 7, 10, 15, 20, 30, 38, 50, 100]:\n#         ax.plot(x, model(x, p), label=p)\n#     ax.legend(title='Order', fontsize=7)\n#     ax.set(xlabel=r'電壓 (mV)')\n#     ax.set(ylabel=r'電流 ($\\mu$A)')\n#     ax.autoscale(tight=True)\n#     fig.savefig('figures/fig15.pdf', backend='pgf')\n#     plt.close()\n\n# %%\n# Styles 'science', 'russian-font'\nwith plt.style.context([\"science\", \"russian-font\"]):\n    fig, ax = plt.subplots()\n    for p in [5, 7, 10, 15, 20, 30, 38, 50, 100]:\n        ax.plot(x, model(x, p), label=p)\n    ax.legend(title=r\"Число\", fontsize=7)\n    ax.set(xlabel=r\"Напряжение (mV)\")\n    ax.set(ylabel=r\"Сила тока ($\\mu$A)\")\n    ax.autoscale(tight=True)\n    fig.savefig(\"figures/fig16.jpg\", dpi=300)\n    plt.close()\n\n# %%\n# Styles 'science', 'turkish-font'\nwith plt.style.context([\"science\", \"turkish-font\"]):\n    fig, ax = plt.subplots()\n    for p in [5, 7, 10, 15, 20, 30, 38, 50, 100]:\n        ax.plot(x, model(x, p), label=p)\n    ax.legend(title=r\"Düzen\", fontsize=7)\n    ax.set(xlabel=r\"Gerilim/Volt (mV)\")\n    ax.set(ylabel=r\"Mevcut Güç/Akım ($\\mu$A)\")\n    ax.autoscale(tight=True)\n    fig.savefig(\"figures/fig17.jpg\", dpi=300)\n    plt.close()\n\n# %%\n# Styles 'science', 'no-latex', 'discrete-rainbow-*'\n# Plot all discrete-rainbow styles\np_list = np.logspace(0, 2, 23)\nfor index in range(1, 23 + 1):\n    style_name = f\"discrete-rainbow-{index}\"\n    figure_name = f\"fig_dr_{index}.jpg\"\n    with plt.style.context([\"science\", \"no-latex\", style_name]):\n        fig, ax = plt.subplots()\n        for p in p_list[: index]:\n            ax.plot(x, model(x, p))\n        ax.autoscale(tight=True)\n        ax.set(**pparam)\n        fig.savefig(f\"figures/{figure_name}\", dpi=300)\n        plt.close()\n\n# %%\n"
  },
  {
    "path": "pyproject.toml",
    "content": "[build-system]\nrequires = [\"setuptools>=77\", \"setuptools_scm>=8\"]\nbuild-backend = \"setuptools.build_meta\"\n\n[project]\nname = \"SciencePlots\"\nauthors = [{ name = \"John Garrett\", email = \"garrettj403@gmail.com\" }]\nmaintainers = [{ name = \"Echedey Luis\", email = \"echelual@gmail.com\" }]\ndescription = \"Format Matplotlib for scientific plotting\"\nreadme = { file = \"README.md\", content-type = \"text/markdown\" }\nlicense = \"MIT\"\nlicense-files = [\"LICENSE\"]\n\nkeywords = [\n    \"matplotlib-style-sheets\",\n    \"matplotlib-figures\",\n    \"scientific-papers\",\n    \"thesis-template\",\n    \"matplotlib-styles\",\n    \"python\",\n]\nclassifiers = [\n    \"Development Status :: 6 - Mature\",\n    \"Intended Audience :: Science/Research\",\n    \"Programming Language :: Python :: 3\",\n    \"Topic :: Scientific/Engineering :: Visualization\",\n    \"Framework :: Matplotlib\",\n]\n\ndynamic = [\"version\"]\n\nrequires-python = \">=3.8\"\ndependencies = [\"matplotlib\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"numpy\"]\nall = [\"SciencePlots[test]\"]\n\n[project.urls]\nHomepage = \"https://github.com/garrettj403/SciencePlots/wiki\"\nDocumentation = \"https://github.com/garrettj403/SciencePlots/wiki\"\nRepository = \"https://github.com/garrettj403/SciencePlots\"\nIssues = \"https://github.com/garrettj403/SciencePlots/issues\"\nChangelog = \"https://github.com/garrettj403/SciencePlots/blob/master/CHANGES.md\"\n\n[tool.setuptools_scm]\n# blank section to avoid warning\n\n[tool.pytest.ini_options]\naddopts = \"-ra\"\ntestpaths = [\"scienceplots/tests\"]\n\n[tool.ruff]\n# Same as Black.\nline-length = 88\nindent-width = 4\n\n# Exclude annotations and type comments\nlint.ignore = [\"ANN\"]\n"
  },
  {
    "path": "src/scienceplots/__init__.py",
    "content": "import os  # pathlib.Path.walk not available in Python <3.12\nimport matplotlib.pyplot as plt\n\nimport scienceplots\nfrom .styles_discovery import read_styles_in_folders\n\n# register the bundled stylesheets in the matplotlib style library\nscienceplots_path = scienceplots.__path__[0]\nstyles_path = os.path.join(scienceplots_path, \"styles\")\n\n# Reads styles in /styles folder and all subfolders\nstylesheets = read_styles_in_folders(styles_path)\n\n# Update dictionary of styles - plt.style.library\nplt.style.core.update_nested_dict(plt.style.library, stylesheets)\n# Update `plt.style.available`, copy-paste from:\n# https://github.com/matplotlib/matplotlib/blob/a170539a421623bb2967a45a24bb7926e2feb542/lib/matplotlib/style/core.py#L266  # noqa: E501\nplt.style.core.available[:] = sorted(plt.style.library.keys())\n"
  },
  {
    "path": "src/scienceplots/styles/color/bright.mplstyle",
    "content": "# Bright color scheme\n# color-blind safe\n# from Paul Tol's website: https://sronpersonalpages.nl/~pault/\n\n# Set color cycle\naxes.prop_cycle : cycler('color', ['4477AA', 'EE6677', '228833', 'CCBB44', '66CCEE', 'AA3377', 'BBBBBB'])\n"
  },
  {
    "path": "src/scienceplots/styles/color/discrete-rainbow/discrete-rainbow-1.mplstyle",
    "content": "# Discrete rainbow color scheme with 1 color\n# from Paul Tol's website: https://sronpersonalpages.nl/~pault/\n\n# Set color cycle\naxes.prop_cycle : cycler('color', ['1965B0'])\n"
  },
  {
    "path": "src/scienceplots/styles/color/discrete-rainbow/discrete-rainbow-10.mplstyle",
    "content": "# Discrete rainbow color scheme with 10 colors\n# from Paul Tol's website: https://sronpersonalpages.nl/~pault/\n\n# Set color cycle\naxes.prop_cycle : cycler('color', ['882E72', '1965B0', '7BAFDE', '4EB265', 'CAE0AB', 'F7F056', 'F4A736', 'E8601C', 'DC050C', '72190E'])\n"
  },
  {
    "path": "src/scienceplots/styles/color/discrete-rainbow/discrete-rainbow-11.mplstyle",
    "content": "# Discrete rainbow color scheme with 11 colors\n# from Paul Tol's website: https://sronpersonalpages.nl/~pault/\n\n# Set color cycle\naxes.prop_cycle : cycler('color', ['882E72', '1965B0', '5289C7', '7BAFDE', '4EB265', 'CAE0AB', 'F7F056', 'F4A736', 'E8601C', 'DC050C', '72190E'])\n"
  },
  {
    "path": "src/scienceplots/styles/color/discrete-rainbow/discrete-rainbow-12.mplstyle",
    "content": "# Discrete rainbow color scheme with 12 colors\n# from Paul Tol's website: https://sronpersonalpages.nl/~pault/\n\n# Set color cycle\naxes.prop_cycle : cycler('color', ['D1BBD7', 'AE76A3', '882E72', '1965B0', '5289C7', '7BAFDE', '4EB265', 'CAE0AB', 'F7F056', 'F4A736', 'E8601C', 'DC050C'])\n"
  },
  {
    "path": "src/scienceplots/styles/color/discrete-rainbow/discrete-rainbow-13.mplstyle",
    "content": "# Discrete rainbow color scheme with 13 colors\n# from Paul Tol's website: https://sronpersonalpages.nl/~pault/\n\n# Set color cycle\naxes.prop_cycle : cycler('color', ['D1BBD7', 'AE76A3', '882E72', '1965B0', '5289C7', '7BAFDE', '4EB265', '90C987', 'CAE0AB', 'F7F056', 'F4A736', 'E8601C', 'DC050C'])\n"
  },
  {
    "path": "src/scienceplots/styles/color/discrete-rainbow/discrete-rainbow-14.mplstyle",
    "content": "# Discrete rainbow color scheme with 14 colors\n# from Paul Tol's website: https://sronpersonalpages.nl/~pault/\n\n# Set color cycle\naxes.prop_cycle : cycler('color', ['D1BBD7', 'AE76A3', '882E72', '1965B0', '5289C7', '7BAFDE', '4EB265', '90C987', 'CAE0AB', 'F7F056', 'F6C141', 'F1932D', 'E8601C', 'DC050C'])\n"
  },
  {
    "path": "src/scienceplots/styles/color/discrete-rainbow/discrete-rainbow-15.mplstyle",
    "content": "# Discrete rainbow color scheme with 15 colors\n# from Paul Tol's website: https://sronpersonalpages.nl/~pault/\n\n# Set color cycle\naxes.prop_cycle : cycler('color', ['D1BBD7', 'AE76A3', '882E72', '1965B0', '5289C7', '7BAFDE', '4EB265', '90C987', 'CAE0AB', 'F7F056', 'F6C141', 'F1932D', 'E8601C', 'DC050C', '72190E'])\n"
  },
  {
    "path": "src/scienceplots/styles/color/discrete-rainbow/discrete-rainbow-16.mplstyle",
    "content": "# Discrete rainbow color scheme with 16 colors\n# from Paul Tol's website: https://sronpersonalpages.nl/~pault/\n\n# Set color cycle\naxes.prop_cycle : cycler('color', ['D1BBD7', 'BA8DB4', 'AA6F9E', '882E72', '1965B0', '5289C7', '7BAFDE', '4EB265', '90C987', 'CAE0AB', 'F7F056', 'F6C141', 'F1932D', 'E8601C', 'DC050C', '72190E'])\n"
  },
  {
    "path": "src/scienceplots/styles/color/discrete-rainbow/discrete-rainbow-17.mplstyle",
    "content": "# Discrete rainbow color scheme with 17 colors\n# from Paul Tol's website: https://sronpersonalpages.nl/~pault/\n\n# Set color cycle\naxes.prop_cycle : cycler('color', ['D1BBD7', 'BA8DB4', 'AA6F9E', '994F88', '882E72', '1965B0', '5289C7', '7BAFDE', '4EB265', '90C987', 'CAE0AB', 'F7F056', 'F6C141', 'F1932D', 'E8601C', 'DC050C', '72190E'])\n"
  },
  {
    "path": "src/scienceplots/styles/color/discrete-rainbow/discrete-rainbow-18.mplstyle",
    "content": "# Discrete rainbow color scheme with 18 colors\n# from Paul Tol's website: https://sronpersonalpages.nl/~pault/\n\n# Set color cycle\naxes.prop_cycle : cycler('color', ['D1BBD7', 'BA8DB4', 'AA6F9E', '994F88', '882E72', '1965B0', '5289C7', '7BAFDE', '4EB265', '90C987', 'CAE0AB', 'F7F056', 'F6C141', 'F1932D', 'E8601C', 'DC050C', 'A5170E', '72190E'])\n"
  },
  {
    "path": "src/scienceplots/styles/color/discrete-rainbow/discrete-rainbow-19.mplstyle",
    "content": "# Discrete rainbow color scheme with 19 colors\n# from Paul Tol's website: https://sronpersonalpages.nl/~pault/\n\n# Set color cycle\naxes.prop_cycle : cycler('color', ['D9CCE3', 'CAACCB', 'BA8DB4', 'AA6F9E', '994F88', '882E72', '1965B0', '5289C7', '7BAFDE', '4EB265', '90C987', 'CAE0AB', 'F7F056', 'F6C141', 'F1932D', 'E8601C', 'DC050C', 'A5170E', '72190E'])\n"
  },
  {
    "path": "src/scienceplots/styles/color/discrete-rainbow/discrete-rainbow-2.mplstyle",
    "content": "# Discrete rainbow color scheme with 2 colors\n# from Paul Tol's website: https://sronpersonalpages.nl/~pault/\n\n# Set color cycle\naxes.prop_cycle : cycler('color', ['1965B0', 'DC050C'])\n"
  },
  {
    "path": "src/scienceplots/styles/color/discrete-rainbow/discrete-rainbow-20.mplstyle",
    "content": "# Discrete rainbow color scheme with 20 colors\n# from Paul Tol's website: https://sronpersonalpages.nl/~pault/\n\n# Set color cycle\naxes.prop_cycle : cycler('color', ['D9CCE3', 'CAACCB', 'BA8DB4', 'AA6F9E', '994F88', '882E72', '1965B0', '437DBF', '6195CF', '7BAFDE', '4EB265', '90C987', 'CAE0AB', 'F7F056', 'F6C141', 'F1932D', 'E8601C', 'DC050C', 'A5170E', '72190E'])\n"
  },
  {
    "path": "src/scienceplots/styles/color/discrete-rainbow/discrete-rainbow-21.mplstyle",
    "content": "# Discrete rainbow color scheme with 21 colors\n# from Paul Tol's website: https://sronpersonalpages.nl/~pault/\n\n# Set color cycle\naxes.prop_cycle : cycler('color', ['D9CCE3', 'CAACCB', 'BA8DB4', 'AA6F9E', '994F88', '882E72', '1965B0', '437DBF', '6195CF', '7BAFDE', '4EB265', '90C987', 'CAE0AB', 'F7F056', 'F7CB45', 'F4A736', 'EE8026', 'E65518', 'DC050C', 'A5170E', '72190E'])\n"
  },
  {
    "path": "src/scienceplots/styles/color/discrete-rainbow/discrete-rainbow-22.mplstyle",
    "content": "# Discrete rainbow color scheme with 22 colors\n# from Paul Tol's website: https://sronpersonalpages.nl/~pault/\n\n# Set color cycle\naxes.prop_cycle : cycler('color', ['D9CCE3', 'CAACCB', 'BA8DB4', 'AA6F9E', '994F88', '882E72', '1965B0', '437DBF', '6195CF', '7BAFDE', '4EB265', '90C987', 'CAE0AB', 'F7F056', 'F7CB45', 'F4A736', 'EE8026', 'E65518', 'DC050C', 'A5170E', '72190E', '42150A'])\n"
  },
  {
    "path": "src/scienceplots/styles/color/discrete-rainbow/discrete-rainbow-23.mplstyle",
    "content": "# Discrete rainbow color scheme with 23 colors\n# from Paul Tol's website: https://sronpersonalpages.nl/~pault/\n\n# Set color cycle\naxes.prop_cycle : cycler('color', ['E8ECFB', 'D9CCE3', 'CAACCB', 'BA8DB4', 'AA6F9E', '994F88', '882E72', '1965B0', '437DBF', '6195CF', '7BAFDE', '4EB265', '90C987', 'CAE0AB', 'F7F056', 'F7CB45', 'F4A736', 'EE8026', 'E65518', 'DC050C', 'A5170E', '72190E', '42150A'])\n"
  },
  {
    "path": "src/scienceplots/styles/color/discrete-rainbow/discrete-rainbow-3.mplstyle",
    "content": "# Discrete rainbow color scheme with 3 colors\n# from Paul Tol's website: https://sronpersonalpages.nl/~pault/\n\n# Set color cycle\naxes.prop_cycle : cycler('color', ['1965B0', 'F7F056', 'DC050C'])\n"
  },
  {
    "path": "src/scienceplots/styles/color/discrete-rainbow/discrete-rainbow-4.mplstyle",
    "content": "# Discrete rainbow color scheme with 4 colors\n# from Paul Tol's website: https://sronpersonalpages.nl/~pault/\n\n# Set color cycle\naxes.prop_cycle : cycler('color', ['1965B0', '4EB265', 'F7F056', 'DC050C'])\n"
  },
  {
    "path": "src/scienceplots/styles/color/discrete-rainbow/discrete-rainbow-5.mplstyle",
    "content": "# Discrete rainbow color scheme with 5 colors\n# from Paul Tol's website: https://sronpersonalpages.nl/~pault/\n\n# Set color cycle\naxes.prop_cycle : cycler('color', ['1965B0', '7BAFDE', '4EB265', 'F7F056', 'DC050C'])\n"
  },
  {
    "path": "src/scienceplots/styles/color/discrete-rainbow/discrete-rainbow-6.mplstyle",
    "content": "# Discrete rainbow color scheme with 6 colors\n# from Paul Tol's website: https://sronpersonalpages.nl/~pault/\n\n# Set color cycle\naxes.prop_cycle : cycler('color', ['1965B0', '7BAFDE', '4EB265', 'CAE0AB', 'F7F056', 'DC050C'])\n"
  },
  {
    "path": "src/scienceplots/styles/color/discrete-rainbow/discrete-rainbow-7.mplstyle",
    "content": "# Discrete rainbow color scheme with 7 colors\n# from Paul Tol's website: https://sronpersonalpages.nl/~pault/\n\n# Set color cycle\naxes.prop_cycle : cycler('color', ['882E72', '1965B0', '7BAFDE', '4EB265', 'CAE0AB', 'F7F056', 'DC050C'])\n"
  },
  {
    "path": "src/scienceplots/styles/color/discrete-rainbow/discrete-rainbow-8.mplstyle",
    "content": "# Discrete rainbow color scheme with 8 colors\n# from Paul Tol's website: https://sronpersonalpages.nl/~pault/\n\n# Set color cycle\naxes.prop_cycle : cycler('color', ['882E72', '1965B0', '7BAFDE', '4EB265', 'CAE0AB', 'F7F056', 'EE8026', 'DC050C'])\n"
  },
  {
    "path": "src/scienceplots/styles/color/discrete-rainbow/discrete-rainbow-9.mplstyle",
    "content": "# Discrete rainbow color scheme with 9 colors\n# from Paul Tol's website: https://sronpersonalpages.nl/~pault/\n\n# Set color cycle\naxes.prop_cycle : cycler('color', ['882E72', '1965B0', '7BAFDE', '4EB265', 'CAE0AB', 'F7F056', 'EE8026', 'DC050C', '72190E'])\n"
  },
  {
    "path": "src/scienceplots/styles/color/high-contrast.mplstyle",
    "content": "# High-contrast color scheme\n# color-blind safe\n# from Paul Tol's website: https://sronpersonalpages.nl/~pault/\n\n# Set color cycle\naxes.prop_cycle : cycler('color', ['004488', 'DDAA33', 'BB5566'])\n"
  },
  {
    "path": "src/scienceplots/styles/color/high-vis.mplstyle",
    "content": "# Matplotlib style for high visability plots (i.e., bright colors!!!)\n\n# Set color cycle\naxes.prop_cycle : (cycler('color', [\"0d49fb\", \"e6091c\", \"26eb47\", \"8936df\", \"fec32d\", \"25d7fd\"]) + cycler('ls', ['-', '--', '-.', ':', '-', '--']))\n"
  },
  {
    "path": "src/scienceplots/styles/color/light.mplstyle",
    "content": "# Light color scheme\n# color-blind safe\n# from Paul Tol's website: https://sronpersonalpages.nl/~pault/\n\n# Set color cycle\naxes.prop_cycle : cycler('color', ['77AADD', 'EE8866', 'EEDD88', 'FFAABB', '99DDFF', '44BB99', 'BBCC33', 'AAAA00', 'DDDDDD'])\n"
  },
  {
    "path": "src/scienceplots/styles/color/muted.mplstyle",
    "content": "# Muted color scheme\n# color-blind safe\n# from Paul Tol's website: https://sronpersonalpages.nl/~pault/\n\n# Set color cycle\naxes.prop_cycle : cycler('color', ['CC6677', '332288', 'DDCC77', '117733', '88CCEE', '882255', '44AA99', '999933', 'AA4499', 'DDDDDD'])\n"
  },
  {
    "path": "src/scienceplots/styles/color/retro.mplstyle",
    "content": "# Retro color style\n\n# Set color cycle\naxes.prop_cycle : cycler('color', ['4165c0', 'e770a2', '5ac3be', '696969', 'f79a1e', 'ba7dcd'])\n"
  },
  {
    "path": "src/scienceplots/styles/color/std-colors.mplstyle",
    "content": "# Standard SciencePlots color cycle\n\n# Set color cycle: blue, green, yellow, red, violet, gray\naxes.prop_cycle : cycler('color', ['0C5DA5', '00B945', 'FF9500', 'FF2C00', '845B97', '474747', '9e9e9e'])\n"
  },
  {
    "path": "src/scienceplots/styles/color/vibrant.mplstyle",
    "content": "# Vibrant color scheme\n# color-blind safe\n# from Paul Tol's website: https://sronpersonalpages.nl/~pault/\n\n# Set color cycle\naxes.prop_cycle : cycler('color', ['EE7733', '0077BB', '33BBEE', 'EE3377', 'CC3311', '009988', 'BBBBBB'])\n"
  },
  {
    "path": "src/scienceplots/styles/journals/ieee.mplstyle",
    "content": "# Matplotlib style for IEEE plots\n# This style should work for most two-column journals\n\n# Set color cycle\n# Set line style as well for black and white graphs\naxes.prop_cycle : (cycler('color', ['k', 'r', 'b', 'g']) + cycler('ls', ['-', '--', ':', '-.']))\n\n# Set default figure size\nfigure.figsize : 3.3, 2.5\nfigure.dpi : 600\n\n# Font sizes\nfont.size : 8\nfont.family : serif\nfont.serif : Times\n"
  },
  {
    "path": "src/scienceplots/styles/journals/nature.mplstyle",
    "content": "# Matplotlib style for Nature journal figures.\n# In general, they advocate for all fonts to be panel labels to be sans serif\n# and all font sizes in a figure to be 7 pt and panel labels to be 8 pt bold.\n\n# Figure size\nfigure.figsize : 3.3, 2.5  # max width is 3.5 for single column\n\n# Font sizes\naxes.labelsize: 7\nxtick.labelsize: 7\nytick.labelsize: 7\nlegend.fontsize: 7\nfont.size: 7\n\n# Font Family\nfont.family: sans-serif\nfont.sans-serif: DejaVu Sans, Arial, Helvetica, Lucida Grande, Verdana, Geneva, Lucid, Avant Garde, sans-serif\nmathtext.fontset : dejavusans\n\n# Set line widths\naxes.linewidth : 0.5\ngrid.linewidth : 0.5\nlines.linewidth : 1.\nlines.markersize: 3\n\n# Always save as 'tight'\n# savefig.bbox : tight\n# savefig.pad_inches : 0.01  # Use virtually all space when we specify figure dimensions\n\n# LaTeX packages\ntext.latex.preamble : \\usepackage{amsmath} \\usepackage{amssymb} \\usepackage{sfmath}\n"
  },
  {
    "path": "src/scienceplots/styles/languages/cjk-jp-font.mplstyle",
    "content": "# Add fonts for CJK characters (Japanese)\n# See FAQ in README for installation instructions\n\nfont.serif : Noto Serif CJK JP\nfont.family : serif\n"
  },
  {
    "path": "src/scienceplots/styles/languages/cjk-kr-font.mplstyle",
    "content": "# Add fonts for CJK characters (Korean)\n# See FAQ in README for installation instructions\n\nfont.serif : Noto Serif CJK KR\nfont.family : serif\n"
  },
  {
    "path": "src/scienceplots/styles/languages/cjk-sc-font.mplstyle",
    "content": "# Add fonts for CJK characters (simplified Chinese)\n# See FAQ in README for installation instructions\n\nfont.serif : Noto Serif CJK SC\nfont.family : serif\n"
  },
  {
    "path": "src/scienceplots/styles/languages/cjk-tc-font.mplstyle",
    "content": "# Add fonts for CJK characters (traditional Chinese)\n# See FAQ in README for installation instructions\n\nfont.serif : Noto Serif CJK TC\nfont.family : serif\n"
  },
  {
    "path": "src/scienceplots/styles/languages/russian-font.mplstyle",
    "content": "# Add Latex packages for Russian (cyrillic) fonts\n\ntext.latex.preamble : \\usepackage[russian]{babel} \\usepackage[utf8]{inputenc} \\usepackage[T2A]{fontenc} \\usepackage{amsmath} \\usepackage{amssymb}\n"
  },
  {
    "path": "src/scienceplots/styles/languages/turkish-font.mplstyle",
    "content": "# Add Latex packages for Turkish (Türkçe) fonts\n\ntext.latex.preamble: \\usepackage[turkish]{babel} \\usepackage[T1]{fontenc} \\usepackage{lmodern} \\usepackage{amsmath} \\usepackage{amssymb}\n"
  },
  {
    "path": "src/scienceplots/styles/misc/grid.mplstyle",
    "content": "# Add grid lines and turn the legend frame on\n\n# Grid lines\naxes.grid : True\naxes.axisbelow : True\ngrid.linestyle : --\ngrid.color : k\ngrid.alpha : 0.5\ngrid.linewidth : 0.5\n\n# Legend\nlegend.frameon : True\nlegend.framealpha : 1.0\nlegend.fancybox : True\nlegend.numpoints : 1\n"
  },
  {
    "path": "src/scienceplots/styles/misc/latex-sans.mplstyle",
    "content": "# Latex with sans-serif fonts\n\nmathtext.fontset : dejavusans\n\n# Use LaTeX for math formatting\ntext.usetex : True\n\n# In general, we need to be careful with the preamble. A common font for\n# sans serif LaTeX is cmbright. However, it does not support bold fontweights\n# so we use sfmath instead. \ntext.latex.preamble : \\usepackage{amsmath} \\usepackage{amssymb} \\usepackage{sfmath}\n"
  },
  {
    "path": "src/scienceplots/styles/misc/no-latex.mplstyle",
    "content": "# Deactivate LaTeX\n# and use mathtext\n\ntext.usetex : False\n\n# Set fonts to be LaTeX defaults\nfont.serif : STIXGeneral\nfont.family : serif\naxes.formatter.use_mathtext : True\nmathtext.fontset : cm\n"
  },
  {
    "path": "src/scienceplots/styles/misc/pgf.mplstyle",
    "content": "# Add LaTeX package to allow PGF plots\n\ntext.latex.preamble : \\usepackage{amsmath} \\usepackage[T1]{fontenc} \\usepackage{pgfplots}\n"
  },
  {
    "path": "src/scienceplots/styles/misc/sans.mplstyle",
    "content": "# Sans-serif\nfont.family : sans-serif\n\n# Latex with sans-serif fonts\nmathtext.fontset : dejavusans\n\n# In general, we need to be careful with the preamble. A common font for\n# sans serif LaTeX is cmbright. However, it does not support bold fontweights\n# so we use sfmath instead. \ntext.latex.preamble : \\usepackage{amsmath} \\usepackage{amssymb} \\usepackage{sfmath}\n"
  },
  {
    "path": "src/scienceplots/styles/notebook.mplstyle",
    "content": "# Matplotlib style for Jupyter notebooks\n\n# Set default figure size\nfigure.figsize : 8, 6\n\n# Set x axis\nxtick.major.size : 6\nxtick.major.width : 1\nxtick.minor.size : 3\nxtick.minor.width : 1\n\n# Set y axis\nytick.major.size : 6\nytick.major.width : 1\nytick.minor.size : 3\nytick.minor.width : 1\n\n# Fontsizes\nxtick.labelsize : 16\nytick.labelsize : 16\nlegend.fontsize : 16\nlegend.title_fontsize : 16\naxes.titlesize : 16\naxes.labelsize : 16\n\n# Set line widths\naxes.linewidth : 1\ngrid.linewidth : 1\nlines.linewidth : 2.\n\n# Use sans-serif fonts\nfont.family : sans-serif\nmathtext.fontset : dejavusans\n\n# Use LaTeX for math formatting\ntext.usetex : False\n"
  },
  {
    "path": "src/scienceplots/styles/scatter.mplstyle",
    "content": "# Matplotlib style for scatter plots\n\n# Set markers (style, color, no lines)\naxes.prop_cycle : (cycler('marker', ['o', 's', '^', 'v', '<', '>', 'd']) + cycler('color', ['0C5DA5', '00B945', 'FF9500', 'FF2C00', '845B97', '474747', '9e9e9e']) + cycler('ls', [' ', ' ', ' ', ' ', ' ', ' ', ' ']))\n\n# Set marker size\nlines.markersize : 3\n"
  },
  {
    "path": "src/scienceplots/styles/science.mplstyle",
    "content": "# Matplotlib style for scientific plotting\n# This is the base style for \"SciencePlots\"\n# see: https://github.com/garrettj403/SciencePlots\n\n# Set color cycle: blue, green, yellow, red, violet, gray\naxes.prop_cycle : cycler('color', ['0C5DA5', '00B945', 'FF9500', 'FF2C00', '845B97', '474747', '9e9e9e'])\n\n# Set default figure size\nfigure.figsize : 3.5, 2.625\n\n# Set x axis\nxtick.direction : in\nxtick.major.size : 3\nxtick.major.width : 0.5\nxtick.minor.size : 1.5\nxtick.minor.width : 0.5\nxtick.minor.visible : True\nxtick.top : True\n\n# Set y axis\nytick.direction : in\nytick.major.size : 3\nytick.major.width : 0.5\nytick.minor.size : 1.5\nytick.minor.width : 0.5\nytick.minor.visible : True\nytick.right : True\n\n# Set line widths\naxes.linewidth : 0.5\ngrid.linewidth : 0.5\nlines.linewidth : 1.\n\n# Remove legend frame\nlegend.frameon : False\n\n# Always save as 'tight'\nsavefig.bbox : tight\nsavefig.pad_inches : 0.05\n\n# Use serif fonts\n# font.serif : Times\nfont.family : serif\nmathtext.fontset : dejavuserif\n\n# Use LaTeX for math formatting\ntext.usetex : True\ntext.latex.preamble : \\usepackage{amsmath} \\usepackage{amssymb}\n"
  },
  {
    "path": "src/scienceplots/styles_discovery.py",
    "content": "import os\n\nimport matplotlib.pyplot as plt\n\n\ndef read_styles_in_folders(root_path):\n    \"\"\"\n    Reads all stylesheets in the given path and its subfolders.\n\n    Parameters\n    ----------\n    root_path : str\n        Path to the root folder containing the stylesheets and other subfolders\n        with stylesheets.\n\n    Returns\n    -------\n    stylesheets : dict\n        Dictionary of stylesheets in the form of {style_name: rcParams}.\n        Should be compatible with matplotlib's plt.style.library dictionary.\n    \"\"\"\n    stylesheets = {}  # plt.style.library is a dictionary\n    for folder, _, _ in os.walk(root_path):\n        new_stylesheets = plt.style.core.read_style_directory(folder)\n        stylesheets.update(new_stylesheets)\n    return stylesheets\n"
  },
  {
    "path": "src/scienceplots/tests/__init__.py",
    "content": ""
  },
  {
    "path": "src/scienceplots/tests/conftest.py",
    "content": "\"\"\"\nConfiguration of SciencePlots tests\n\"\"\"\n\nimport pytest\nimport scienceplots\nimport numpy as np\n\nimport os\nfrom pathlib import Path\n\nSTYLES_PATH = Path(scienceplots.__path__[0], \"styles\")\n\n\ndef get_styles_in_dir(dir):\n    \"\"\"\n    Input: directory path\n    Output: set of matplotlib styles filenames (without trailing '.mplstyle')\n    \"\"\"\n    styles_paths = Path(dir).glob(\"*.mplstyle\")\n    return set(fn.stem for fn in styles_paths)\n\n\n@pytest.fixture(scope=\"session\")\ndef styles_in_scienceplots_per_folder():\n    \"\"\"\n    Output: dictionary of styles per folder in SciencePlots\n    \"\"\"\n    styles_per_folder = {}\n    for folder, _, _ in os.walk(STYLES_PATH):  # 1st _ : subdirs, 2nd _ : files\n        folder = Path(folder)\n        styles_per_folder[folder.name] = get_styles_in_dir(folder)\n    return styles_per_folder\n\n\n@pytest.fixture(scope=\"session\")\ndef xy_example_values():\n    \"\"\"\n    Output: \"x\" 1D values, \"y\" 2D values, and 1D \"p\" values for the example plot\n    \"\"\"\n\n    def model(x, p):  # from examples/plot-examples.py\n        return x ** (2 * p + 1) / (1 + x ** (2 * p))\n\n    x = np.linspace(0.75, 1.25, 201)\n    p = [10, 15, 20, 30, 50, 100]\n    res = np.fromiter(map(lambda p: model(x, p), p), dtype=np.dtype((float, len(x))))\n    return x, res, p\n"
  },
  {
    "path": "src/scienceplots/tests/test_scienceplots.py",
    "content": "\"\"\"Test suite of SciencePlots\n\"\"\"\n\nimport matplotlib.pyplot as plt\n\n\ndef test_matplotlib_required_api_existence():\n    \"\"\"Check if all functions and attributes used by scienceplots are available\n    in matplotlib.\n    \"\"\"\n    assert hasattr(plt.style, \"core\")\n    assert hasattr(plt.style.core, \"read_style_directory\")\n    assert hasattr(plt.style.core, \"update_nested_dict\")\n    assert hasattr(plt.style, \"available\")\n    assert hasattr(plt.style, \"library\")\n\n\ndef test_styles_existence(styles_in_scienceplots_per_folder):\n    \"\"\"Check all styles are available in matplotlib.\"\"\"\n    for folder, styles in styles_in_scienceplots_per_folder.items():\n        assert len(styles) > 0, f\"No styles found in {folder}.\"\n        for style in styles:\n            assert (  # both in list of names and the library they are retrieved from hello\n                style in plt.style.available and style in plt.style.library\n            ), f\"'{style}' not in available styles. Style in folder {folder}.\"\n\n\ndef test_usage_of_each_style(\n    xy_example_values, styles_in_scienceplots_per_folder, tmp_path,\n):\n    \"\"\"Tests if the styles are correctly formatted and can be applied to a plot.\"\"\"\n    pparam = {\"xlabel\": \"Voltage (mV)\", \"ylabel\": r\"Current ($\\mu$A)\"}\n    x, ys, p = xy_example_values\n    for folder, styles in styles_in_scienceplots_per_folder.items():\n        for style in styles:\n            output_file = tmp_path / f\"test_{folder}_{style}.png\"\n            with plt.style.context(style):\n                fig, ax = plt.subplots()\n                for y in ys:\n                    ax.plot(x, y)\n                ax.legend(p, title=\"Order\")\n                ax.set(**pparam)\n                ax.autoscale(tight=True)\n                fig.savefig(output_file)\n                plt.close(fig)\n"
  }
]