📊 Soothing pastel theme for matplotlib
Project description
Catppuccin for Matplotlib
Previews
Line plot
Bar plot
Box plot
Scatter plot
Patches
Colormap
Usage
pip install mplcatppuccin
- 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()
- Mix it with different stylesheets!
mpl.style.use(["ggplot", "mocha"])
plt.plot([0,1,2,3], [1,2,3,4])
plt.show()
- 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()
- 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
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
Close
Hashes for catppuccin-matplotlib-0.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 736880aa56b3591896f4438058ce3484ab2072d20255e21237ca0cdb50c214d6 |
|
MD5 | 1cb48d1f7981fb025a3fcc755c4c1aec |
|
BLAKE2b-256 | dc43cbd470d8cfe8630fc01393bad3cdd7c54fa4a739f0c32f012bb0d189070b |
Close
Hashes for catppuccin_matplotlib-0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 308b8c1e7f9dcb1cf13a2a7e0d57cd9d240deea63fc3b9b697a4c88c27c65479 |
|
MD5 | 634360b8309b8d84a98f6a0c81f818e2 |
|
BLAKE2b-256 | f6106534c239fabb5c9c7e1710db9a9c2231223b8624aa55de09d5f373bd8042 |