Skip to main content

Perceptually uniform colourmaps

Project description

Python package

cmcrameri

This is a basic 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 said colourmaps are my own.

Current version is based on Scientific Colourmaps Version 6.0.4 (06.01.2020)

Work in progress Not ready for public use yet! I haven't shipped a package before. The eventual aim is for this repo to serve PyPi and conda

Install

pip install cmcrameri

Basic use 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 also use tab autocompletion on cm if your editor supports it

For a reversed colourmap, append _r to the colourmap name

For a sample of all the available colourmaps without leaving the comfort of your Python session

from cmcrameri.cm import show_cmaps 
show_cmaps()

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

Uploaded Source

File details

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

File metadata

  • Download URL: cmcrameri-0.10.tar.gz
  • Upload date:
  • Size: 86.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

File hashes

Hashes for cmcrameri-0.10.tar.gz
Algorithm Hash digest
SHA256 38f449643602f276e944b5c1e8d3768a7207cf7fffd7af23a8817d333394ce2c
MD5 17c6a8dc5c9655c38732a1dbf01a0f0e
BLAKE2b-256 1566c6e84de2c71d3fe6afdfd3c00309b4fd833a3337e2d447bb14ca81973c8b

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