cmyt
Matplotlib colormaps from the yt project !
Colormaps overview
The following colormaps, as well as their respective reversed (*_r) versions are available
Perceptually uniform sequential colormaps
Monochromatic sequential colormaps
Miscellaneous
Installation
with pip
python -m pip install cmyt
or with conda
conda install -c conda-forge cmyt
Usage
cmyt integrates with matplotlib in a similar fashion to cmocean or cmasher
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.
Metadata
Release files for cmyt 2.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cmyt-2.0.2.tar.gz | 71.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cmyt-2.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 101.4 kB
Release files / cmyt-2.0.2.tar.gz
| Download URL | cmyt-2.0.2.tar.gz |
|---|---|
| Size | 71.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cf308415401c615dffded3033be575373553573740298e44ef4b016ffd99a9be
|
|
BLAKE2b-256 checksum How to use checksums |
8848374669553a8f667148777442821285fb609e0b8fa26e7cf906a20e1dd85f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Release files / cmyt-2.0.2-py3-none-any.whl
| Download URL | cmyt-2.0.2-py3-none-any.whl |
|---|---|
| Size | 30.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c814a9d0d6d71b5354a0e0fcff1d8d08f9cefd3985c767f9ea06ff4d28cb4c40
|
|
BLAKE2b-256 checksum How to use checksums |
d6137f45b93baa90aa1fc447103255164b2c369ea1a56caa617821f110101f35
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|