Matplotlib style for scientific publications.
Project description
mplscience
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)
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
Built Distribution
File details
Details for the file mplscience-0.0.7.tar.gz
.
File metadata
- Download URL: mplscience-0.0.7.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.9.6 Darwin/22.2.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3de80bec156cfff6f0f9c3e8cdfa5c3fd7e526cf1a60d8fe0c1c7a45a289d4f2 |
|
MD5 | f2bbd3cc09e98fe4e83a0a7798f189ca |
|
BLAKE2b-256 | c526124fa1edb65dc84ceba0d871d54bc7182fddb9b9391b6ebca7b3f0fe1b41 |
File details
Details for the file mplscience-0.0.7-py3-none-any.whl
.
File metadata
- Download URL: mplscience-0.0.7-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.9.6 Darwin/22.2.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e78e4a8e50159c51dde36e045e2f02bea287faf36eaca86beaf6587f1f8d4ae0 |
|
MD5 | 6a8e2f796222e96346f9c6d394670454 |
|
BLAKE2b-256 | b28ec8e46ff80ead8ac274f070549b432fec1495af2c6b5ebd2ce1178f693634 |