Skip to main content

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

To install:

pip install mplscience

To use:

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)

Release files for mplscience 0.0.7

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

Source distribution (sdist)

Source distribution for mplscience 0.0.7
File Size Uploaded
mplscience-0.0.7.tar.gz 4.2 kB Details

Built distribution (wheel)

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

Total release size:8.9 kB

Release files / mplscience-0.0.7.tar.gz

Download URL mplscience-0.0.7.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
3de80bec156cfff6f0f9c3e8cdfa5c3fd7e526cf1a60d8fe0c1c7a45a289d4f2
BLAKE2b-256 checksum
How to use checksums
c526124fa1edb65dc84ceba0d871d54bc7182fddb9b9391b6ebca7b3f0fe1b41
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.9.6 Darwin/22.2.0

Release files / mplscience-0.0.7-py3-none-any.whl

Download URL mplscience-0.0.7-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e78e4a8e50159c51dde36e045e2f02bea287faf36eaca86beaf6587f1f8d4ae0
BLAKE2b-256 checksum
How to use checksums
b28ec8e46ff80ead8ac274f070549b432fec1495af2c6b5ebd2ce1178f693634
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.9.6 Darwin/22.2.0

Release history Release notifications | RSS feed

This release

0.0.7 This release

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

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