Skip to main content

Color schemes for lines and maps, color-blind safe

Project description

Tol_colors

Color schemes for lines and maps, color-blind safe

PyPI GitHub release

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

tol_colors-1.2.1.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

tol_colors-1.2.1-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file tol_colors-1.2.1.tar.gz.

File metadata

  • Download URL: tol_colors-1.2.1.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.8

File hashes

Hashes for tol_colors-1.2.1.tar.gz
Algorithm Hash digest
SHA256 d716bb1001540ee5eabc40bcbdee9e332a7cc459e8ea77052b93a1080d6e3fb6
MD5 69bce3ba55ca633cb674a333e9bc5ae7
BLAKE2b-256 8ccc42cb287bfa9685bc0e8b6c9d9db32c36852e4722239d501cdb2f9e242a08

See more details on using hashes here.

File details

Details for the file tol_colors-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: tol_colors-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.8

File hashes

Hashes for tol_colors-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9ef6289185a584ddbaa6d01bc66cc2b7592efb7734b564bc7fb320f7af781302
MD5 13f3d34deb8687944b308d3c98061e57
BLAKE2b-256 d8a7132acbb2409404ee3d93e7a0e1aa1e6cc5f3445aa4117130352607f3e723

See more details on using hashes here.

Supported by

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