MPL Styler
Project description
MPL Styler
Introduction
This package is a small collection of different style for the plots produced using matplotlib, including one for paper/presentation/poster-ready graphs.
Currently available styles are:
- 'sci_pure' for clean and paper-ready plots;
- 'sci_faded' for kind of a sun-faded look with soft colors;
- 'night_wave' for eye-pleasing plots with dark background and neon colors.
The last one is heavily inspired by the 'cyberpunk' style (https://github.com/dhaitz/mplcyberpunk).
There are also a couple of functions for use mostly with the 'night_wave' style for adding glow to and/or a gradient under lines, bars and histograms.
Installation and usage
Install from PyPI:
pip install komorebi_mpl
Import the package and use komorebi_mpl.use() to apply a style — it sets the style and returns pyplot ready to use:
import komorebi_mpl as kmpl
plt = kmpl.use("sci_faded")
plt.plot([i for i in range(30)])
Alternatively, apply styles directly via matplotlib:
from matplotlib import pyplot as plt
import komorebi_mpl # registers the styles
plt.style.use("sci_faded")
plt.plot([i for i in range(30)])
Examples
Below are shown all the available styles and functions.
Clean scientific style: sci_pure
Publication-ready plots: clean, vibrant, w/b-ready.
Sun-faded scientific style: sci_faded
Sun-faded-paper type of plots.
Neon style: night_wave
Neon and synthwave kind of vibe.
This is where the functions come into play and make this style shine. We can make the lines glow.
We can also add a gradient under each line.
Bar-plot with just this style is childish.
Add a gradient - now we're talking.
Histogram is the same as bar plots: ok-ish.
Add a gradient and voila.
The glow effect can also be added to the scatter plot giving the points a star-like shine.
Acknowledgment
Shout-out to Dominik Haitz who's written the mindblowing 'mplcyberpunk' package (https://github.com/dhaitz/mplcyberpunk) and the functions from which I adapted for this package. Also check out John Garrett's 'SciencePlots' (https://github.com/garrettj403/SciencePlots) for publication-ready plots.
License and contact info
This package is available under the MIT license. See LICENSE for more information. If you'd like to contact me, the author, feel free to write at sergei.kulkov23@gmail.com.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file komorebi_mpl-0.0.4.tar.gz.
File metadata
- Download URL: komorebi_mpl-0.0.4.tar.gz
- Upload date:
- Size: 12.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80f3f42abc662d6ca0579368b16c0a58e6d1b32855dbac776231fb0608f966db
|
|
| MD5 |
267f89b0d052f52d5d3e03055598aa97
|
|
| BLAKE2b-256 |
ce979baafa48238b238e351260d8dbf3730147573833ed69d44805a02b4e2323
|
Provenance
The following attestation bundles were made for komorebi_mpl-0.0.4.tar.gz:
Publisher:
publish.yml on rngKomorebi/komorebi_mpl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
komorebi_mpl-0.0.4.tar.gz -
Subject digest:
80f3f42abc662d6ca0579368b16c0a58e6d1b32855dbac776231fb0608f966db - Sigstore transparency entry: 1188736881
- Sigstore integration time:
-
Permalink:
rngKomorebi/komorebi_mpl@2b44f1af8b8898da0c281a43161a3ef41fb2bf26 -
Branch / Tag:
refs/tags/v0.0.4 - Owner: https://github.com/rngKomorebi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2b44f1af8b8898da0c281a43161a3ef41fb2bf26 -
Trigger Event:
release
-
Statement type:
File details
Details for the file komorebi_mpl-0.0.4-py3-none-any.whl.
File metadata
- Download URL: komorebi_mpl-0.0.4-py3-none-any.whl
- Upload date:
- Size: 15.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38f547d5730a14cc8176a688de415aa8c76bb94675ba31c67fe36175d883cdfb
|
|
| MD5 |
60923aa05f058c7cb66f546e54347158
|
|
| BLAKE2b-256 |
0a80b89f74e8a5ae2a8274e538f77af2aaeaa4872b5603be2acf62b700cfc8b0
|
Provenance
The following attestation bundles were made for komorebi_mpl-0.0.4-py3-none-any.whl:
Publisher:
publish.yml on rngKomorebi/komorebi_mpl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
komorebi_mpl-0.0.4-py3-none-any.whl -
Subject digest:
38f547d5730a14cc8176a688de415aa8c76bb94675ba31c67fe36175d883cdfb - Sigstore transparency entry: 1188736883
- Sigstore integration time:
-
Permalink:
rngKomorebi/komorebi_mpl@2b44f1af8b8898da0c281a43161a3ef41fb2bf26 -
Branch / Tag:
refs/tags/v0.0.4 - Owner: https://github.com/rngKomorebi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2b44f1af8b8898da0c281a43161a3ef41fb2bf26 -
Trigger Event:
release
-
Statement type: