Color schemes for lines and maps, color-blind safe
Project description
Tol_colors
Color schemes for lines and maps, color-blind safe
Thoses color schemes were designed by Paul Tol. This repository is only packaging his work so that it can be easily installed using pip. His work and details on how to use thoses schemes can be found on his website and in the docs directory.
Install
Using pip:
pip install tol-colors
From source:
git clone https://github.com/Descanonge/tol_colors.git
cd tol_colors
pip install .
Get started
Show the available colorsets, colormaps, and discrete rainbow colormap:
import tol_colors as tc
tc.main()
Get a colorset:
cset = tc.tol_cset('bright')
Get a colormap:
cmap = tc.tol_cmap('sunset')
See the functions docstrings for details.
To change default colorset (for lines) and colormap:
import matplotlib.pyplot as plt
plt.rc('axes', prop_cycle=plt.cycler('color', list(tc.tol_cset('bright'))))
plt.cm.register_cmap('rainbow_PuRd', tc.tol_cmap('rainbow_PuRd'))
plt.rc('image', cmap='rainbow_PuRd')
Requirements
- numpy
- matplotlib
See also
Other packages already implement these colorschemes and might better suit your needs:
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
Built Distribution
File details
Details for the file tol_colors-1.0.2.tar.gz
.
File metadata
- Download URL: tol_colors-1.0.2.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67690da663bd106bb76ad247cbf011e1eb5b6430255716f0cafabc883a8a968c |
|
MD5 | 432a3c40a75b1ed43f36d659cb83841f |
|
BLAKE2b-256 | 95937020e3ef343542280ccfbd229335bff88e2153962be333e6b890df371deb |
File details
Details for the file tol_colors-1.0.2-py3-none-any.whl
.
File metadata
- Download URL: tol_colors-1.0.2-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b08eb5256e34545c9755dba3d76f5c67bb0160b94b1b5dd8db5a9ae044c43c4 |
|
MD5 | 96c4b152865991f330ccdeab513b01da |
|
BLAKE2b-256 | 81b1c3e3ed38817fd376e0c65519f43ff5bdd0855c94cea52a560a38829edb41 |