Skip to content

51616/catppuccin-matplotlib

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

27 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Logo
Catppuccin for Matplotlib

Previews

Line plot
Bar plot
Box plot
Scatter plot
Patches
Colormap

Usage

  1. pip install catppuccin-matplotlib
  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

About

๐Ÿ“Š Soothing pastel theme for Matplotlib

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 75.5%
  • Makefile 24.5%