scimorph


Namescimorph JSON
Version 1.0.3 PyPI version JSON
download
home_pagehttps://github.com/haihuilab/scimorph/
SummaryScientific theme of Matplotlib for publication
upload_time2025-01-01 05:03:16
maintainerHaihui Zhang
docs_urlNone
authorHaihui Zhang
requires_pythonNone
licenseBSD 3-Clause License
keywords matplotlib-style-sheets matplotlib-figures scientific-papers thesis-template matplotlib-styles python
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            scimorph: theme_publication
=============

<p align="left">
    <table>
        <tr>
            <td style="text-align: center;">PyPI version</td>
            <td style="text-align: center;">
                <a href="https://badge.fury.io/py/scimorph">
                    <img src="https://badge.fury.io/py/scimorph.svg" alt="PyPI version" height="18"/>
                </a>
            </td>
        </tr>
        <tr>
            <td style="text-align: center;">conda-forge version</td>
            <td style="text-align: center;">
                <a href="https://anaconda.org/conda-forge/scimorph">
                    <img src="https://anaconda.org/conda-forge/scimorph/badges/version.svg" alt="conda-forge version" height="18"/>
                </a>
            </td>
        </tr>
    </table>
</p>

> **Warning**
> : The `scimorph` library requires LaTeX for math formatting. Install it using:
>   `sudo apt install texlive texlive-latex-extra texlive-fonts-recommended cm-super dvipng`.
> : Starting with version 1.0.0, you must add `import scimorph` **before** setting the style with `theme_publication('publication')`.


*Matplotlib styles for scientific figures*

This repo has Matplotlib styles to format your figures for scientific papers, presentations and theses.

<p align="center">
<img src="https://github.com/haihuilab/scimorph/blob/main/examples/plots/fig01a.jpg" width="500">
</p>

You can find [the full tutorials of scimorph here](https://github.com/haihuilab/scimorph/wiki/Gallery).

Getting Started
---------------

The easiest way to install scimorph is by using `pip`:

```bash
# to install the latest release (from PyPI)
pip install scimorph

# to install the latest commit (from GitHub)
pip install git+https://github.com/haihuilab/scimorph

# to clone and install from a local copy
git clone https://github.com/haihuilab/scimorph.git
cd scimorph
pip install -e .
```

From version `v1.0.0` on, `import scimorph` is needed on top of your scripts so Matplotlib can make use of the styles.

**Notes:** 
- scimorph-theme_publication requires matplotlib or seaborn

Using the Styles
----------------

``"publication"`` is the primary style in this repo. Whenever you want to use it, simply add the following to the top of your python script:

```python
import matplotlib.pyplot as plt
import scimorph

theme_publication('publication')
```


Examples
--------
```python
import matplotlib.pyplot as plt
import numpy as np
from pathlib import Path
from scimorph.theme_publication import theme_publication
dir = Path.cwd()
print('parent dir: ',dir)

x = np.linspace(0, 2 * np.pi, 500)
y = np.sin(x)
# df = pd.DataFrame({'x': x, 'y': y})

theme_publication('publication', 
                    figsize='medium', 
                    fontsize=None, 
                    grid=True,
                    border=True)
plt.plot(x, y)
plt.xlabel('x')
plt.ylabel('y')
plt.savefig(f'{dir}/examples/plots/fig01a.jpg')
plt.show()

```
The basic ``publication`` style is shown below:

<img src="https://github.com/haihuilab/scimorph/blob/main/examples/plots/fig01a.jpg" width="500">



If you use ``scimorph`` in your paper/thesis, feel free to add it to the list!

Citing scimorph:
-------------------

    @article{scimorph,
      author       = {Haihui Zhang et al},
      title        = {haihuilab/scimorph},
      month        = Jan,
      year         = 2025,
      publisher    = {github},
      version      = {1.0.0},      
      url          = {https://github.com/haihuilab/scimorph}
    }

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/haihuilab/scimorph/",
    "name": "scimorph",
    "maintainer": "Haihui Zhang",
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": "hanfei19@gmail.com",
    "keywords": "matplotlib-style-sheets, matplotlib-figures, scientific-papers, thesis-template, matplotlib-styles, python",
    "author": "Haihui Zhang",
    "author_email": "hanfei19@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/44/6c/29b5bfb7bd36a0dab0cfc44908a0ac2e8ca390e7e05de3e1861b783e822b/scimorph-1.0.3.tar.gz",
    "platform": null,
    "description": "scimorph: theme_publication\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/scimorph\">\n                    <img src=\"https://badge.fury.io/py/scimorph.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/scimorph\">\n                    <img src=\"https://anaconda.org/conda-forge/scimorph/badges/version.svg\" alt=\"conda-forge version\" height=\"18\"/>\n                </a>\n            </td>\n        </tr>\n    </table>\n</p>\n\n> **Warning**\n> : The `scimorph` library requires LaTeX for math formatting. Install it using:\n>   `sudo apt install texlive texlive-latex-extra texlive-fonts-recommended cm-super dvipng`.\n> : Starting with version 1.0.0, you must add `import scimorph` **before** setting the style with `theme_publication('publication')`.\n\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/haihuilab/scimorph/blob/main/examples/plots/fig01a.jpg\" width=\"500\">\n</p>\n\nYou can find [the full tutorials of scimorph here](https://github.com/haihuilab/scimorph/wiki/Gallery).\n\nGetting Started\n---------------\n\nThe easiest way to install scimorph is by using `pip`:\n\n```bash\n# to install the latest release (from PyPI)\npip install scimorph\n\n# to install the latest commit (from GitHub)\npip install git+https://github.com/haihuilab/scimorph\n\n# to clone and install from a local copy\ngit clone https://github.com/haihuilab/scimorph.git\ncd scimorph\npip install -e .\n```\n\nFrom version `v1.0.0` on, `import scimorph` is needed on top of your scripts so Matplotlib can make use of the styles.\n\n**Notes:** \n- scimorph-theme_publication requires matplotlib or seaborn\n\nUsing the Styles\n----------------\n\n``\"publication\"`` 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 scimorph\n\ntheme_publication('publication')\n```\n\n\nExamples\n--------\n```python\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom pathlib import Path\nfrom scimorph.theme_publication import theme_publication\ndir = Path.cwd()\nprint('parent dir: ',dir)\n\nx = np.linspace(0, 2 * np.pi, 500)\ny = np.sin(x)\n# df = pd.DataFrame({'x': x, 'y': y})\n\ntheme_publication('publication', \n                    figsize='medium', \n                    fontsize=None, \n                    grid=True,\n                    border=True)\nplt.plot(x, y)\nplt.xlabel('x')\nplt.ylabel('y')\nplt.savefig(f'{dir}/examples/plots/fig01a.jpg')\nplt.show()\n\n```\nThe basic ``publication`` style is shown below:\n\n<img src=\"https://github.com/haihuilab/scimorph/blob/main/examples/plots/fig01a.jpg\" width=\"500\">\n\n\n\nIf you use ``scimorph`` in your paper/thesis, feel free to add it to the list!\n\nCiting scimorph:\n-------------------\n\n    @article{scimorph,\n      author       = {Haihui Zhang et al},\n      title        = {haihuilab/scimorph},\n      month        = Jan,\n      year         = 2025,\n      publisher    = {github},\n      version      = {1.0.0},      \n      url          = {https://github.com/haihuilab/scimorph}\n    }\n",
    "bugtrack_url": null,
    "license": "BSD 3-Clause License",
    "summary": "Scientific theme of Matplotlib for publication",
    "version": "1.0.3",
    "project_urls": {
        "Homepage": "https://github.com/haihuilab/scimorph/"
    },
    "split_keywords": [
        "matplotlib-style-sheets",
        " matplotlib-figures",
        " scientific-papers",
        " thesis-template",
        " matplotlib-styles",
        " python"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5bd4f82d1c16a1e8579954bdcfc5f7dcacc68c1ce44da39bfd094b19d1b21d5d",
                "md5": "e58ae5bea77d8aa9dffc2451e4847a83",
                "sha256": "ed93eccbb867980ef7239bd59c8eaa851706ef08ecda5012b0e7724f06b7318f"
            },
            "downloads": -1,
            "filename": "scimorph-1.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e58ae5bea77d8aa9dffc2451e4847a83",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 23873,
            "upload_time": "2025-01-01T05:03:14",
            "upload_time_iso_8601": "2025-01-01T05:03:14.116147Z",
            "url": "https://files.pythonhosted.org/packages/5b/d4/f82d1c16a1e8579954bdcfc5f7dcacc68c1ce44da39bfd094b19d1b21d5d/scimorph-1.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "446c29b5bfb7bd36a0dab0cfc44908a0ac2e8ca390e7e05de3e1861b783e822b",
                "md5": "ee2b43380a245859fe76f017ad2adcda",
                "sha256": "8de213afb028b390e6c8504b89db6d9372680536da4eefebba0b5ddfe735e89a"
            },
            "downloads": -1,
            "filename": "scimorph-1.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "ee2b43380a245859fe76f017ad2adcda",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 12099,
            "upload_time": "2025-01-01T05:03:16",
            "upload_time_iso_8601": "2025-01-01T05:03:16.993550Z",
            "url": "https://files.pythonhosted.org/packages/44/6c/29b5bfb7bd36a0dab0cfc44908a0ac2e8ca390e7e05de3e1861b783e822b/scimorph-1.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-01 05:03:16",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "haihuilab",
    "github_project": "scimorph",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "scimorph"
}
        
Elapsed time: 0.56502s