Skip to main content

A collection of Matplotlib colormaps from the yt project

Project description

cmyt

PyPI Supported Python Versions

CI pre-commit.ci status

yt-project Code style: black Imports: isort

Matplotlib colormaps from the yt project !

Colormaps overview

The following colormaps, as well as their respective reversed (*_r) versions are available

Installation

python -m pip install 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-0.1.1.tar.gz (25.4 kB view details)

Uploaded Source

Built Distribution

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

cmyt-0.1.1-py3-none-any.whl (27.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cmyt-0.1.1.tar.gz
  • Upload date:
  • Size: 25.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for cmyt-0.1.1.tar.gz
Algorithm Hash digest
SHA256 15ddc244ea7a43027454e123ff3c0a10575289b92bc08f6793bb13d0c840414c
MD5 6c5013ed29b00980faaaf83970e3e715
BLAKE2b-256 10b385027235b22bd0155459fff06ed9616dab5a4a735329af475ba228208f0c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cmyt-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 27.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for cmyt-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f4ff575c7bcab9f922ec6cf8445520835853b12f71515f5cf9a8004096309def
MD5 93de25acd095d577024476047b9566f2
BLAKE2b-256 daf37d6851ca344b2c3c9fac19d33dce8da506fd2d81823677033d473b87b2df

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