Skip to main content

A collection of Matplotlib colormaps from the yt project

Reason this release was yanked:

corrupt version (built with an unsupported python version)

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.1.0.tar.gz (27.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cmyt-1.1.0-py3-none-any.whl (30.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cmyt-1.1.0.tar.gz
  • Upload date:
  • Size: 27.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for cmyt-1.1.0.tar.gz
Algorithm Hash digest
SHA256 95779e1b6df48dd37b29a1371d5118a9f94c25188e569cbdffee11851dea77af
MD5 af36cf6cde66c4ee5722fbccacc1b94b
BLAKE2b-256 54f75228ba622283f17bdd25e21ac8e92a6c2cd7d17eef907062a1f6621de46c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cmyt-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 30.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for cmyt-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d57f1f0fc260357c06b08c23a4eaac4457d0dc0eb42e062048714b7e6e2c8430
MD5 13028bee6bd31021acd56d48937ab216
BLAKE2b-256 611350c1608fecfafc11ac0a9fe4d1e4531f54779dd4e2d60049cf992ac62c4f

See more details on using hashes here.

Supported by

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