Skip to main content

📊 Soothing pastel theme for matplotlib

Project description

Logo
Catppuccin for Matplotlib

Previews

Line plot
Bar plot
Box plot
Scatter plot
Patches
Colormap

Usage

  1. pip install mplcatppuccin
  2. Import the module to register the stylesheets and colormaps
import mplcatppuccin
import matplotlib as mpl
import matplotlib.pyplot as plt

mpl.style.use("mocha")
plt.plot([0,1,2,3], [1,2,3,4])
plt.show()
  1. Mix it with different stylesheets!
mpl.style.use(["ggplot", "mocha"])
plt.plot([0,1,2,3], [1,2,3,4])
plt.show()
  1. Load individual colors
from mplcatppuccin.palette import load_color

color = load_color("mocha", "peach")
plt.plot([0,1,2,3], [1,2,3,4], color=color)
plt.show()
  1. Define custom colormaps
from mplcatppuccin.colormaps import get_colormap_from_list
import numpy as np

cmap = get_colormap_from_list("mocha", ["red", "peach", "yellow", "green"])
data = np.random.randint(10, size=(30, 30))
plt.imshow(cmap, cmap=cmap)
plt.show()

💝 Thanks to

 

Copyright © 2021-present Catppuccin Org

Project details


Release history Release notifications | RSS feed

This version

0.4

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

catppuccin-matplotlib-0.4.tar.gz (8.6 kB view hashes)

Uploaded Source

Built Distribution

catppuccin_matplotlib-0.4-py3-none-any.whl (11.8 kB view hashes)

Uploaded Python 3

Supported by

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