Skip to main content

Matplotlib style for scientific publications.

Project description

mplscience

Open In Colab Code style: black

Matplotlib style for scientific publications. This style keeps things pretty simple and aims to make moderate improvements to the base matplotlib style. It also sets things like the PDF font type to make it easier to interact with figures in Adobe Illustrator. Open the tutorial in Colab to see examples. mplscience is compatible with all Matplotlib-based packages, including Seaborn.

Usage

import mplscience
import seaborn as sns
mplscience.available_styles()
mplscience.set_style()
df = sns.load_dataset("anscombe")
sns.scatterplot(x="x", y="y", hue="dataset", data=df)
scatter

If you're using Seaborn, you may want to run sns.reset_orig() first to clear Seaborn-specific styling. You can also use the reset_current parameter of mplscience functions to reset any custom styling like this:

mplscience.set_style(reset_current=True)

The style can also be using in a context like this:

import mplscience
with mplscience.style_context():
    plt.plot(x, y)

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

mplscience-0.0.5.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

mplscience-0.0.5-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file mplscience-0.0.5.tar.gz.

File metadata

  • Download URL: mplscience-0.0.5.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.7.6 Darwin/20.3.0

File hashes

Hashes for mplscience-0.0.5.tar.gz
Algorithm Hash digest
SHA256 a53af8af6571fcd8d07cc27ebd201ac0e717063788c96d9036027638e725133a
MD5 e92ec0dbcb2c8a976432e2f73fedc3e8
BLAKE2b-256 1a4e38e1f55d40b21b5efa424ed8ad7e23f1c5d13eb20e47e1da50828c03debb

See more details on using hashes here.

File details

Details for the file mplscience-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: mplscience-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.7.6 Darwin/20.3.0

File hashes

Hashes for mplscience-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d0c71f9ac4ff44002584d288dba1cd3a3cd2f0f163366aa525a12428f2adfb25
MD5 2122bb422e7a4246386317c47ab15bde
BLAKE2b-256 5b9f7da7a72ebf1d203fd6a3aae30a3ad6898d519a2be89a372ca3f765d08f3d

See more details on using hashes here.

Supported by

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