Skip to main content

Perceptually uniform colourmaps

Project description

Python package

Python 3.6 Python 3.7 Python 3.8 Python 3.9

Downloads (PyPI)

Conda Downloads (conda-forge)

cmcrameri

This is a Python wrapper around Fabio Crameri's perceptually uniform colour maps

http://www.fabiocrameri.ch/colourmaps.php

All credit for creating the colourmaps to Fabio. Any errors in the Python implementation of colourmaps are my own.

This version is based on Scientific Colourmaps Version 7.0 (02.02.2021)

Install

With pip:

pip install cmcrameri

With conda:

conda config --add channels conda-forge
conda install cmcrameri

Usage example

from cmcrameri import cm
import matplotlib.pyplot as plt
import numpy as np
x = np.linspace(0, 100, 100)[None, :]  
plt.imshow(x, aspect='auto', cmap=cm.batlow) # or any of the other colourmaps made by Fabio Crameri
plt.axis('off')
plt.show()

Extra instructions

You can access all the core colourmaps from Fabio Crameri's list by cm.<colormapname>

You can use tab autocompletion on cm if your editor supports it

For a reversed colourmap, append _r to the colourmap name

Categorical colormaps have the suffix S

For an image of all the available colourmaps without leaving the comfort of your Python session

from cmcrameri.cm import show_cmaps 
show_cmaps()

License

This work is licensed under an MIT license.

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

cmcrameri-1.2.tar.gz (114.2 kB view details)

Uploaded Source

Built Distribution

cmcrameri-1.2-py3-none-any.whl (133.8 kB view details)

Uploaded Python 3

File details

Details for the file cmcrameri-1.2.tar.gz.

File metadata

  • Download URL: cmcrameri-1.2.tar.gz
  • Upload date:
  • Size: 114.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.6.0.post20210108 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for cmcrameri-1.2.tar.gz
Algorithm Hash digest
SHA256 cf965b96676f5e7aa021585dba21f6906ff4d5eb7d9d921789e4c5d639596eb0
MD5 6cbeaa19896965cbc2ff2ec7240a97cf
BLAKE2b-256 6f20b662ce375cca40c69748ba189e3fb2319be6050c43a80af3c72ef5a47fb9

See more details on using hashes here.

File details

Details for the file cmcrameri-1.2-py3-none-any.whl.

File metadata

  • Download URL: cmcrameri-1.2-py3-none-any.whl
  • Upload date:
  • Size: 133.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for cmcrameri-1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8a2f01bd3d1a3f97ad5c7a205a2e73f0fca122421c5d0cd1b5926b2bc4577a12
MD5 b4ad503e002297224d312120f539bf53
BLAKE2b-256 6c15b31544ec37f365dfd7122ad6919f1dccb40b19cd38e4518e3292d89c79d3

See more details on using hashes here.

Supported by

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