A collection of Matplotlib colormaps from the yt project
Matplotlib colormaps from the yt project !
The following colormaps, as well as their respective reversed (
*_r) versions are available
Perceptually uniform sequential colormaps
Monochromatic sequential colormaps
python3 -m pip install cmyt
conda install -c conda-forge cmyt
import numpy as np import matplotlib.pyplot as plt import cmyt # that's it ! # generate example data prng = np.random.RandomState(0x4D3D3D3) noise = prng.random_sample((100, 100)) x, y = np.mgrid[-50:50, -50:50] z = 5 * np.exp(-(x ** 2 + y ** 2) / 1000) # setup the figure fig, ax = plt.subplots() ax.set(aspect="equal") # now we can refer to cmyt colormaps as strings im = ax.pcolormesh(x, y, z + noise, cmap="cmyt.arbre", shading="flat") fig.colorbar(im, ax=ax)
# alternatively, cmyt maps can also be imported as objects from cmyt import pastel fig, ax = plt.subplots() ax.set(aspect="equal") im = ax.contourf(x, y, z + noise, cmap=pastel) fig.colorbar(im, ax=ax)
A gallery of comparable examples using all colormaps from cmyt is available in the test directory.
cmyt uses semantic versioning as defined by https://semver.org.
In practice this means that new colormaps may be added in minor patches, and any backward incompatible change to existing colormaps will happen as a major change.
If you're developing a library that depends on cmyt, we recommend to set an explicit upper limit as well as a minimal one in your requirements as for instance
cmyt >= 1.0.3, < 2.0.0
with the minimal required version pointing to the e.g. the last colormap addition your need, and the upper limit preventing your CI to upgrade to a major change without your knowing. Also note that only the top level of the package is considered public API.
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size cmyt-1.0.3-py3-none-any.whl (29.2 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size cmyt-1.0.3.tar.gz (27.3 kB)||File type Source||Python version None||Upload date||Hashes View|