Skip to main content

scistyles: Matplotlib stylesheets for scientific publications.

Project description

scistyles

Matplotlib stylesheets for scientific publications.

Installation

The package is available on pypi. Simply run:

pip install scistyles

Usage

The first purpose of this module is to supply matplotlib stylesheets to assist in the creation of scientific figures. Custom stylesheets can be stored in relative paths or in mpl_configdir, but both solutions require manual copy and emailing for reusing and sharing. Storing the stylesheets in a centralized repository facilitate reuse and sharing.

The stylesheets stored under src/scistyles/stylelib are loaded automatically when importing scistyles.

Therefore, just use them:

import matplotlib.pyplot as plt
import scistyles

plt.style.use("presentation-sp")
# plot away!

Under the hood, this module simply extends the matplotlib.style to accept a directory as an argument. If you have your own personal styles you don't want to share^1, you can still load the styles directly:

import matplotlib.pyplot as plt
from scistyles
scistyles.update_library(style_dirs=["~/path/to/secret/stylesheets"])

plt.style.use("trademarked-style")
# ...

Contributing

Contributions are welcome! In case you have strong disagreement with our choice of tick width or legend handlelength, then fine, just contribute your own stylesheet. We won't argue[^2], and just add it to the pile. Simply make sure to give the stylesheet a name that is not already taken.

To contribute a stylesheet, just write an issue. For large contributions, a PR would be appreciated.

See also

For everything about rcParams and stylesheets, see the official matplotlib documentation.

TODO

  • Add a test plot and autogenerated gallery.
  • add a few further design tools (colors, palettes...)

Notes

[^2]: We aren't talking about colormaps.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scistyles-1.0.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scistyles-1.0-py2.py3-none-any.whl (15.6 kB view details)

Uploaded Python 2Python 3

File details

Details for the file scistyles-1.0.tar.gz.

File metadata

  • Download URL: scistyles-1.0.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.28.1

File hashes

Hashes for scistyles-1.0.tar.gz
Algorithm Hash digest
SHA256 48ed4ddb1843f51b2d1100cf00d49598cdbb270d13018042d821780a520ca4dc
MD5 f7791525c07dba71c59d125c173e0f39
BLAKE2b-256 f9648bddd89651c54870f6815faa4d3dcec30bf8d72962104411df00bdb95970

See more details on using hashes here.

File details

Details for the file scistyles-1.0-py2.py3-none-any.whl.

File metadata

  • Download URL: scistyles-1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.28.1

File hashes

Hashes for scistyles-1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c2f4db769f8cb9ad94f6a7f29d113fe9969de2899d24789c8ffdd8f35adc55fe
MD5 9815ec7580a9817df4962dde7e44bb73
BLAKE2b-256 7f58be2c1795032ff2bd5e5b4709777f2aef415feb5671914f2b1fb3f73d4e20

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page