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.3.tar.gz (12.1 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.3-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: komorebi_mpl-0.0.3.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

Hashes for komorebi_mpl-0.0.3.tar.gz
Algorithm Hash digest
SHA256 67abd824cedc557f59102397d9b4049136244845ce6d12a45f7f0aecc1e4e7a0
MD5 f90441bede6a1728cd7b74f238363684
BLAKE2b-256 2195f7740e71b149080dab9f1c2e39340845fa406e75928ae08ea69f252fa3fe

See more details on using hashes here.

Provenance

The following attestation bundles were made for komorebi_mpl-0.0.3.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.3-py3-none-any.whl.

File metadata

  • Download URL: komorebi_mpl-0.0.3-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

Hashes for komorebi_mpl-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 fb0a99a4476d2af1a35973d1cf40d95b3a7aab348b8d208ce439937c66c61465
MD5 d33494c06344c25b00e5475814c32702
BLAKE2b-256 c140bcf3ac02a7ae7fc0cc0e72cd8ab6aab8547e7646896daf5968525c748546

See more details on using hashes here.

Provenance

The following attestation bundles were made for komorebi_mpl-0.0.3-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