Skip to content

Commit

Permalink
Merge branch 'master' of github.com:callumrollo/cmcrameri
Browse files Browse the repository at this point in the history
  • Loading branch information
callumrollo committed May 6, 2020
2 parents dac6913 + abbd919 commit 3ca8994
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,35 @@
# cmcrameri

This is a basic wrapper around Fabio Crameri's perceptually uniform colour maps
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 made a package before. The eventual aim is for this repo to serve PyPI and anaconda
**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

To use these colourmaps, clone/download the repo, add the folder to your path then:
```python
from cmcrameri import cm
import matplotlib.pyplot as plt
import numpy as mp
plt.pcolor(np.random.rand(10,10), cmap=cm.batlow) # or any of the other colourmaps made by Fabio Crameri
```
You can access all the colourmaps by cm.colormapname you can also use tab autocompletion. For a reversed colourmap, append `_r` to the colormap name
### 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
```python
from cmcrameri.cm import show_cmaps
show_cmaps()
```

0 comments on commit 3ca8994

Please sign in to comment.