Skip to main content

scimorph: theme_publication

PyPI version PyPI version
conda-forge version conda-forge version

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.

You can find the full tutorials of scimorph here.

Getting Started

The easiest way to install scimorph is by using pip:

# 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:

import matplotlib.pyplot as plt
import scimorph

theme_publication('publication')

Examples

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:

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}
}

Metadata

Release files for scimorph 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scimorph 1.0.3
File Size Uploaded Provenance Actions
scimorph-1.0.3.tar.gz 12.1 kB Without provenance Details for scimorph-1.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for scimorph 1.0.3
File Interpreter ABI Platform Actions
scimorph-1.0.3-py3-none-any.whl Python 3 none any Details for scimorph-1.0.3-py3-none-any.whl

Total release size: 36.0 kB

Release files / scimorph-1.0.3.tar.gz

Download URL scimorph-1.0.3.tar.gz
Size 12.1 kB
Tags Source
SHA-256 checksum
How to use checksums
8de213afb028b390e6c8504b89db6d9372680536da4eefebba0b5ddfe735e89a
BLAKE2b-256 checksum
How to use checksums
446c29b5bfb7bd36a0dab0cfc44908a0ac2e8ca390e7e05de3e1861b783e822b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.2

Release files / scimorph-1.0.3-py3-none-any.whl

Download URL scimorph-1.0.3-py3-none-any.whl
Size 23.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ed93eccbb867980ef7239bd59c8eaa851706ef08ecda5012b0e7724f06b7318f
BLAKE2b-256 checksum
How to use checksums
5bd4f82d1c16a1e8579954bdcfc5f7dcacc68c1ce44da39bfd094b19d1b21d5d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.2

Security for scimorph 1.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page