Skip to main content

A collection of Matplotlib colormaps from the yt project

Project description

cmyt

PyPI Conda Version Supported Python Versions

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

yt-project Code style: black

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

python3 -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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cmyt-1.0.4.tar.gz (25.5 kB view details)

Uploaded Source

Built Distribution

cmyt-1.0.4-py3-none-any.whl (30.4 kB view details)

Uploaded Python 3

File details

Details for the file cmyt-1.0.4.tar.gz.

File metadata

  • Download URL: cmyt-1.0.4.tar.gz
  • Upload date:
  • Size: 25.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for cmyt-1.0.4.tar.gz
Algorithm Hash digest
SHA256 ae5157d37e733ae55df12bad1e8aedb3eb2f3b45e829e25c83df023dcefd5926
MD5 9792de4dec5db9ff366989ab1fc06ccb
BLAKE2b-256 6cb86a2cf314d07862f22b4327941e2e6127fa75f38c6b8bbfba790c0c7630f4

See more details on using hashes here.

File details

Details for the file cmyt-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: cmyt-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 30.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for cmyt-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 aed700aa071fa216c548e3dbc0090c69d7b0dd6d528345f5f286cb0357f063cf
MD5 af71a9545750b8efa94dbffb6c60a189
BLAKE2b-256 2eb1270a024f723fda150c1fcd441d0764760593db4115d09a462bce20ed5c13

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page