{"id":13400656,"url":"https://github.com/garrettj403/SciencePlots","last_synced_at":"2025-03-14T06:31:49.141Z","repository":{"id":37514689,"uuid":"144605189","full_name":"garrettj403/SciencePlots","owner":"garrettj403","description":"Matplotlib styles for scientific plotting","archived":false,"fork":false,"pushed_at":"2024-10-12T10:48:32.000Z","size":87417,"stargazers_count":7270,"open_issues_count":5,"forks_count":713,"subscribers_count":64,"default_branch":"master","last_synced_at":"2024-12-26T09:19:08.658Z","etag":null,"topics":["cjk-fonts","ieee-paper","latex","matplotlib-figures","matplotlib-style-sheets","matplotlib-styles","python","scientific-papers","thesis-template"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/garrettj403.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-13T16:23:03.000Z","updated_at":"2024-12-26T02:36:37.000Z","dependencies_parsed_at":"2023-01-29T23:15:31.142Z","dependency_job_id":"fa0a3308-b873-4d63-a525-ca0933173080","html_url":"https://github.com/garrettj403/SciencePlots","commit_stats":{"total_commits":185,"total_committers":16,"mean_commits":11.5625,"dds":0.3621621621621621,"last_synced_commit":"977c8eec59db5e06de973999c57ee6cacafee31e"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garrettj403%2FSciencePlots","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garrettj403%2FSciencePlots/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garrettj403%2FSciencePlots/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garrettj403%2FSciencePlots/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/garrettj403","download_url":"https://codeload.github.com/garrettj403/SciencePlots/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243537794,"owners_count":20307098,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cjk-fonts","ieee-paper","latex","matplotlib-figures","matplotlib-style-sheets","matplotlib-styles","python","scientific-papers","thesis-template"],"created_at":"2024-07-30T19:00:54.339Z","updated_at":"2025-03-14T06:31:49.132Z","avatar_url":"https://github.com/garrettj403.png","language":"Python","readme":"Science Plots\n=============\n\n\u003cp align=\"left\"\u003e\n    \u003ctable\u003e\n        \u003ctr\u003e\n            \u003ctd style=\"text-align: center;\"\u003ePyPI version\u003c/td\u003e\n            \u003ctd style=\"text-align: center;\"\u003e\n                \u003ca href=\"https://badge.fury.io/py/SciencePlots\"\u003e\n                    \u003cimg src=\"https://badge.fury.io/py/SciencePlots.svg\" alt=\"PyPI version\" height=\"18\"/\u003e\n                \u003c/a\u003e\n            \u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n            \u003ctd style=\"text-align: center;\"\u003econda-forge version\u003c/td\u003e\n            \u003ctd style=\"text-align: center;\"\u003e\n                \u003ca href=\"https://anaconda.org/conda-forge/scienceplots\"\u003e\n                    \u003cimg src=\"https://anaconda.org/conda-forge/scienceplots/badges/version.svg\" alt=\"conda-forge version\" height=\"18\"/\u003e\n                \u003c/a\u003e\n            \u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n            \u003ctd style=\"text-align: center;\"\u003eDOI\u003c/td\u003e\n            \u003ctd style=\"text-align: center;\"\u003e\n                \u003ca href=\"https://zenodo.org/badge/latestdoi/144605189\"\u003e\n                    \u003cimg src=\"https://zenodo.org/badge/144605189.svg\" alt=\"DOI\" height=\"18\"/\u003e\n                \u003c/a\u003e\n            \u003c/td\u003e\n        \u003c/tr\u003e\n    \u003c/table\u003e\n\u003c/p\u003e\n\n\u003e **Warning**\n\u003e : 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\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://github.com/garrettj403/SciencePlots/raw/master/examples/figures/fig01a.jpg\" width=\"500\"\u003e\n\u003c/p\u003e\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\u003cimg src=\"https://github.com/garrettj403/SciencePlots/raw/master/examples/figures/fig01a.jpg\" width=\"500\"\u003e\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\u003cimg src=\"https://github.com/garrettj403/SciencePlots/raw/master/examples/figures/fig10.jpg\" width=\"500\"\u003e\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\u003cimg src=\"https://github.com/garrettj403/SciencePlots/raw/master/examples/figures/fig02a.jpg\" width=\"500\"\u003e\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\u003cimg src=\"https://github.com/garrettj403/SciencePlots/raw/master/examples/figures/fig02c.jpg\" width=\"500\"\u003e\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\u003cimg src=\"https://github.com/garrettj403/SciencePlots/raw/master/examples/figures/fig14a.jpg\" width=\"500\"\u003e\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\u003cimg src=\"https://github.com/garrettj403/SciencePlots/raw/master/examples/figures/fig06.jpg\" width=\"500\"\u003e\n\nThe ``high-vis`` color cycle:\n\n\u003cimg src=\"https://github.com/garrettj403/SciencePlots/raw/master/examples/figures/fig04.jpg\" width=\"500\"\u003e\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- 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\u0026type_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\u0026safe_filename=XXXX_final.pdf\u0026type_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\u0026safe_filename=Waveguide_Bend__IEEE_MWCL_.pdf\u0026type_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\u0026safe_filename=GarrettJ_DPhilThesis.pdf\u0026type_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\u0026safe_filename=GarrettJ_DPhilThesis.pdf\u0026type_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","funding_links":[],"categories":["Python","Popular \u0026 New Non-LaTeX Templates","ReserchTools","其他_机器学习与深度学习","**Miscellanea**","Uncategorized","Visualization","Plot tools"],"sub_categories":["Others","**Linear Attention / State Space Models / Recurrent Language Models / etc.**","Uncategorized","2D Visualization"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarrettj403%2FSciencePlots","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgarrettj403%2FSciencePlots","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarrettj403%2FSciencePlots/lists"}