Skip to main content

cmyt

PyPI Conda Version

CI CI (bleeding edge) pre-commit.ci status

yt-project Ruff

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)

Source distribution for cmyt 2.0.2
File Size Uploaded
cmyt-2.0.2.tar.gz 71.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cmyt 2.0.2
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

2.0.2 This release

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.4.0

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page