Mplscience
Matplotlib style for scientific publications
Install / Use
/learn @adamgayoso/MplscienceREADME
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)
<img src="https://github.com/adamgayoso/mplscience/blob/main/images/scatter.png?raw=true" width="300" alt="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)
Related Skills
node-connect
328.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
80.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
328.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
80.9kCommit, push, and open a PR
