Skip to main content

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

komorebi_mpl-0.0.2.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

komorebi_mpl-0.0.2-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file komorebi_mpl-0.0.2.tar.gz.

File metadata

  • Download URL: komorebi_mpl-0.0.2.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for komorebi_mpl-0.0.2.tar.gz
Algorithm Hash digest
SHA256 c784efc6d918a7f86f00b7530e7c6516f934588744a1eb4e19c506d4eda0a0d5
MD5 1a4ae5a4bbecd19767d082ec544a88e0
BLAKE2b-256 e75f09f7d094fe869bbf5f9da01ad52cbad8616e32c496fa2ebb90bc44eea892

See more details on using hashes here.

Provenance

The following attestation bundles were made for komorebi_mpl-0.0.2.tar.gz:

Publisher: publish.yml on rngKomorebi/komorebi_mpl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file komorebi_mpl-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: komorebi_mpl-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for komorebi_mpl-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cbea031fe862088c41b03b333ba1a531f745a9fc47f01415bd2171bed5b337b3
MD5 f568436812524b546be7e8328b09a1db
BLAKE2b-256 08e9bee4403232de95f780d35df0e03aa996cbe620906a8550d8001f7d2582de

See more details on using hashes here.

Provenance

The following attestation bundles were made for komorebi_mpl-0.0.2-py3-none-any.whl:

Publisher: publish.yml on rngKomorebi/komorebi_mpl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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