pax_global_header 0000666 0000000 0000000 00000000064 15107467337 0014527 g ustar 00root root 0000000 0000000 52 comment=4e1c283f7f0a6115521343ed3d781bed0676f60d garrettj403-SciencePlots-003616a/ 0000775 0000000 0000000 00000000000 15107467337 0016433 5 ustar 00root root 0000000 0000000 garrettj403-SciencePlots-003616a/.github/ 0000775 0000000 0000000 00000000000 15107467337 0017773 5 ustar 00root root 0000000 0000000 garrettj403-SciencePlots-003616a/.github/ISSUE_TEMPLATE/ 0000775 0000000 0000000 00000000000 15107467337 0022156 5 ustar 00root root 0000000 0000000 garrettj403-SciencePlots-003616a/.github/ISSUE_TEMPLATE/01-bug.yml 0000664 0000000 0000000 00000006445 15107467337 0023705 0 ustar 00root root 0000000 0000000 name: Any Report description: File a general purpose report # title: labels: ["bug", "user question/help"] # assignees: body: - type: markdown attributes: value: | Please check it hasn't already been reported in the [issue tracker](../). Thanks for taking the time to fill this out! It really helps us a lot. - type: markdown attributes: value: | First of all, let's have a look to your environment: run the following Python code snippet and paste the output below. ```python import platform import sys import subprocess from importlib.metadata import version print('System: ' + platform.platform()) print('Python: ' + sys.version) print('SciencePlots: ' + version('scienceplots')) print('Matplotlib: ' + version('matplotlib')) print('LaTeX distro:') subprocess.run(["latex", "-v"]) ``` - type: textarea id: env attributes: label: Environment description: Paste here the output of the code above placeholder: | System: Windows-10-10.0.19044-SP0 Python: 3.10.4 (tags/v3.10.4:9d38120, Mar 23 1984, 24:00:00) [MSC v.1929 64 bit (AMD64)] SciencePlots: 0.0.0 Matplotlib: 0.0.0 LaTeX distro: pdfTeX 3.141592653589793238-pi (TeX Live 2022) kpathsea version 6.3.4 Copyright 2022 Han The Thanh (pdfTeX) et al. There is NO warranty. Redistribution of this software is covered by the terms of both the pdfTeX copyright and the Lesser GNU General Public License. For more information about these matters, see the file named COPYING and the pdfTeX source. Primary author of pdfTeX: Han The Thanh (pdfTeX) et al. Compiled with libpng 1.6.37; using libpng 1.6.37 Compiled with zlib 1.2.11; using zlib 1.2.11 Compiled with xpdf version 4.03 CompletedProcess(args=['latex', '-v'], returncode=O) # value: "" render: "Python console" validations: required: true - type: textarea id: styles attributes: label: Affected styles description: > List all styles you are using. Do not miss anyone, they may change the behaviour entirely. placeholder: | ["science", "no-latex"] # value: "" render: "Python console" validations: required: true - type: textarea id: user-description attributes: label: "Describe the issue here" # description: "" placeholder: "What do you expect? What happens?" # value: "" validations: required: true - type: textarea id: how-to-reproduce attributes: label: "How can we replicate it? What have you tried? Please, add a reproducible example" description: "Paste inline code between backticks [`] and code blocks between 3 [```]" placeholder: "Be as accurate as possible, it will help us very much." # value: "" validations: required: true - type: textarea id: extra attributes: label: "Extra info" description: "Please, specify anything else that may be of help (e.g. links to other issues that may be related anywhere, StackOverflow posts, etc.)" # placeholder: "" # value: "" validations: required: false garrettj403-SciencePlots-003616a/.github/workflows/ 0000775 0000000 0000000 00000000000 15107467337 0022030 5 ustar 00root root 0000000 0000000 garrettj403-SciencePlots-003616a/.github/workflows/pytest.yaml 0000664 0000000 0000000 00000001436 15107467337 0024250 0 ustar 00root root 0000000 0000000 name: Pytest on: push: branches: [ "master" ] pull_request: branches: [ "master" ] jobs: build: runs-on: ubuntu-latest strategy: fail-fast: false matrix: python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.x"] steps: - uses: actions/checkout@v5 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | python -m pip install --upgrade pip python -m pip install .[test] sudo apt update sudo apt install dvipng texlive-latex-extra texlive-fonts-recommended cm-super sudo apt install fonts-noto-cjk - name: Test with pytest run: | pytest garrettj403-SciencePlots-003616a/.github/workflows/ruff_check.yaml 0000664 0000000 0000000 00000001067 15107467337 0025017 0 ustar 00root root 0000000 0000000 name: Ruff Check on: push: pull_request: jobs: ruff-lint: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v5 - name: Set up Python uses: actions/setup-python@v6 with: python-version: '3.x' - name: Install dependencies run: | python -m pip install --upgrade pip pip install ruff - name: Run Ruff run: ruff check --output-format=github . garrettj403-SciencePlots-003616a/.gitignore 0000664 0000000 0000000 00000006140 15107467337 0020424 0 ustar 00root root 0000000 0000000 .ipynb_checkpoints/ .DS_STORE SciencePlots.egg-info/ dist/ dev/ TODO.md new-version.md # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] *$py.class # C extensions *.so # Distribution / packaging .Python build/ develop-eggs/ dist/ downloads/ eggs/ .eggs/ lib/ lib64/ parts/ sdist/ var/ wheels/ share/python-wheels/ *.egg-info/ .installed.cfg *.egg MANIFEST # PyInstaller # Usually these files are written by a python script from a template # before PyInstaller builds the exe, so as to inject date/other infos into it. *.manifest *.spec # Installer logs pip-log.txt pip-delete-this-directory.txt # Unit test / coverage reports htmlcov/ .tox/ .nox/ .coverage .coverage.* .cache nosetests.xml coverage.xml *.cover *.py,cover .hypothesis/ .pytest_cache/ cover/ # Translations *.mo *.pot # Django stuff: *.log local_settings.py db.sqlite3 db.sqlite3-journal # Flask stuff: instance/ .webassets-cache # Scrapy stuff: .scrapy # Sphinx documentation docs/_build/ # PyBuilder .pybuilder/ target/ # Jupyter Notebook .ipynb_checkpoints # IPython profile_default/ ipython_config.py # pyenv # For a library or package, you might want to ignore these files since the code is # intended to run in multiple environments; otherwise, check them in: # .python-version # pipenv # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. # However, in case of collaboration, if having platform-specific dependencies or dependencies # having no cross-platform support, pipenv may install dependencies that don't work, or not # install all needed dependencies. #Pipfile.lock # poetry # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. # This is especially recommended for binary packages to ensure reproducibility, and is more # commonly ignored for libraries. # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control #poetry.lock # pdm # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. #pdm.lock # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it # in version control. # https://pdm.fming.dev/#use-with-ide .pdm.toml # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm __pypackages__/ # Celery stuff celerybeat-schedule celerybeat.pid # SageMath parsed files *.sage.py # Environments .env .venv env/ venv/ ENV/ env.bak/ venv.bak/ # Spyder project settings .spyderproject .spyproject # Rope project settings .ropeproject # mkdocs documentation /site # mypy .mypy_cache/ .dmypy.json dmypy.json # Pyre type checker .pyre/ # pytype static type analyzer .pytype/ # Cython debug symbols cython_debug/ # PyCharm # JetBrains specific template is maintained in a separate JetBrains.gitignore that can # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore # and can be added to the global gitignore or merged into this file. For a more nuclear # option (not recommended) you can uncomment the following to ignore the entire idea folder. #.idea/ garrettj403-SciencePlots-003616a/CHANGES.md 0000664 0000000 0000000 00000010303 15107467337 0020022 0 ustar 00root root 0000000 0000000 v2.2.0 (20-Nov-2025) ==================== New features ------------ - Fix `['science', 'no-latex']` font does not work with symbols (e.g. degree symbol) This style set was found to be incompatible with _Cartopy_. - Add all 23 "discrete rainbow" styles proposed by Paul Tol on his website (by @IchBinGROOT) Access them with the style names `discrete-rainbow-1`, `discrete-rainbow-2`, ..., `discrete-rainbow-23` - Update `README.md` to reflect that _Install from `conda-forge` is now available!_ Maintenance ----------- - Update Paul Tol's webpage link to https://sronpersonalpages.nl/~pault/ in relevant comments through the project. - Improve `turkish-font.mplstyle` (may add some breaking changes) 1. `:` and `!` are now interpreted as text by default, not as control characters. 2. Assume UTF-8 encoding by default. 3. Enhance compatibility, especially with T1 font encoding, by using the package `lmodern`. - Now all subdirectories of the ``styles`` folder are parsed for styles, instead of just the first two levels. - Upgrade & unify issue templates. v2.1.1 (25-Nov-2023) ==================== - Avoid Matplotlib issuing `INFO` log statements about no available fonts due to last release changes. - Add `science` + `no-latex ` example v2.1.0 (30-May-2023) ==================== - Change `science` and `ieee` to use Times New Roman look-alike fonts - Tweak `plot-examples.py` and clean PDF output v2.0.1 (03-Dec-2022) ==================== - Add Turkish `turkish-font` language style v2.0.0 (21-Nov-2022) ==================== - Fix import on case sensitive OSs - Finally bump to this version, following breaking change of distribution v1.1.0 (07-Nov-2022) ==================== - Major change in distribution system - Now needs import directive `import scienceplots` - Fix not using raw string in `plot-example.py` - Update README v1.0.9 (16-Sep-2021) ==================== - `notebook`: - make Latex fonts sans-serif - Fix bug with Latex packages: - e.g., `\usepackage{amsmath, amssymb, sfmath}` --> `\usepackage{amsmath} \usepackage{amssymb} \usepackage{sfmath}` - Add `pyproject.toml` file (see PEP 517/518) - Minor updates to README, including adding more papers to publication list v1.0.8 (02-Jun-2021) ==================== - ``nature``: - Added style for Nature articles - Uses sans-serif fonts - ``latex-sans``: - Added style for using LaTeX with sans-serif fonts - ``std-colors``: - Added style to recover the standard color cycle of the SciencePlots package - 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"])``. - ``science``: - Added ``amssymb`` to LaTeX preamble - ``grid``: - Set ``axes.axisbelow`` to True - Minor updates to README v1.0.7 (28-Feb-2021) ==================== - Add support for CJK fonts: - see README for details - Add example of CJK fonts: - see Fig 14a, Fig 14b, Fig 14c, Fig 14d - ``science`` style: - use default serif font - ``ieee`` style: - use Times font - ``grid`` style: - change line style to '--' - README: - add badge for Zenodo reference - add info on citing SciencePlots - add info on using Times New Roman - add more papers using SciencePlots v1.0.6 (19-Oct-2020) ==================== - The main reason for this release is to trigger Zenodo: - I've added SciencePlots to Zenodo (an archiving service). - It only archives after new releases, so I will make a trivial version bump. - Trivial changes to README: - Added installation info for Google Colab, Jupyter Notebooks, etc. - Added PyPI badge - Added more papers to list v1.0.5 (8-Sep-2020) =================== - New color blind safe color cycles (``high-contrast.mplstyle``, ``light.mplstyle``). Taken from [Paul Tol's website](https://personal.sron.nl/~pault/). - Fixed color order in ``muted.mplstyle``, ``vibrant.mplstyle``, and ``bright.mplstyle``. v1.0.4 (14-Aug-2020) ==================== - New style: ``grid`` - this will add grid lines - ``science`` style: - use a serif font with mathtex - README: - Add example of the ``notebook`` style - Add FAQ - Update publications - Other misc changes... garrettj403-SciencePlots-003616a/LICENSE 0000664 0000000 0000000 00000002054 15107467337 0017441 0 ustar 00root root 0000000 0000000 MIT License Copyright (c) 2018 John Garrett Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. garrettj403-SciencePlots-003616a/MANIFEST.in 0000664 0000000 0000000 00000000117 15107467337 0020170 0 ustar 00root root 0000000 0000000 prune .github prune .git prune examples exclude .gitignore exclude CHANGES.md garrettj403-SciencePlots-003616a/README.md 0000664 0000000 0000000 00000030676 15107467337 0017726 0 ustar 00root root 0000000 0000000 Science Plots =============
| PyPI version |
|
| conda-forge version |
|
| DOI |
|
It can be cascaded with other styles to fine-tune the appearance. For example, the ``science`` + ``notebook`` styles (intended for Jupyter notebooks):
Please see [the project Wiki](https://github.com/garrettj403/SciencePlots/wiki/Gallery) for a full list of available styles.
Specific Styles for Academic Journals
-------------------------------------
The ``science`` + ``ieee`` styles for IEEE papers:
- 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.
The ``science`` + ``nature`` styles for Nature articles:
- Nature recommends sans-serif fonts.
Other languages
---------------
SciencePlots currently supports:
* [Traditional Chinese](https://github.com/garrettj403/SciencePlots/wiki/Gallery#traditional-chinese)
* [Simplified Chinese](https://github.com/garrettj403/SciencePlots/wiki/Gallery#simplified-chinese)
* [Japanese](https://github.com/garrettj403/SciencePlots/wiki/Gallery#japanese)
* [Korean](https://github.com/garrettj403/SciencePlots/wiki/Gallery#korean)
* [Russian](https://github.com/garrettj403/SciencePlots/wiki/Gallery#russian)
* [Turkish](https://github.com/garrettj403/SciencePlots/wiki/Gallery#turkish)
Example: Traditional Chinese (`science` + `no-latex` + `cjk-tc-font`):
See the [FAQ](https://github.com/garrettj403/SciencePlots/wiki/FAQ#installing-cjk-fonts) for information on installing CJK fonts.
Other color cycles
------------------
SciencePlots 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.
The ``bright`` color cycle (color blind safe):
The ``high-vis`` color cycle:
Paul Tol's discrete rainbow color sets are available as well, with the style identifier ``discrete-rainbow-
Help and Contributing
---------------------
Please 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.
If 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).
You can checkout [Matplotlib's documentation](https://matplotlib.org/tutorials/introductory/customizing.html) for more information on plotting settings.
FAQ
---
You can find [the FAQ in the project Wiki.](https://github.com/garrettj403/SciencePlots/wiki/FAQ)
SciencePlots in Academic Papers
-------------------------------
The following papers use ``SciencePlots``:
- 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".)
- 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.
- 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))
- 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.
- 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.
- 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))
- 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.
- 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))
- 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))
- 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))
- 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))
- 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))
- 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))
- 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))
If you use ``SciencePlots`` in your paper/thesis, feel free to add it to the list!
Citing SciencePlots
-------------------
You don't have to cite SciencePlots if you use it but it's nice if you do:
@article{SciencePlots,
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}
}
garrettj403-SciencePlots-003616a/examples/ 0000775 0000000 0000000 00000000000 15107467337 0020251 5 ustar 00root root 0000000 0000000 garrettj403-SciencePlots-003616a/examples/figures/ 0000775 0000000 0000000 00000000000 15107467337 0021715 5 ustar 00root root 0000000 0000000 garrettj403-SciencePlots-003616a/examples/figures/fig01a.jpg 0000664 0000000 0000000 00000176334 15107467337 0023504 0 ustar 00root root 0000000 0000000 JFIF ,, C
$.' ",#(7),01444'9=82<.342 C
2!!22222222222222222222222222222222222222222222222222 "
} !1AQa"q2#BR$3br
%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz
w !1AQaq"2B #3Rbr
$4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ? (
(
(
(
(
(
(
(
(w9Zkoqɻn3A}h|oz<