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

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

Uploaded Source

Built Distribution

tol_colors-1.0.1-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tol_colors-1.0.1.tar.gz
  • Upload date:
  • Size: 5.5 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

Hashes for tol_colors-1.0.1.tar.gz
Algorithm Hash digest
SHA256 9d7c907036d19c6d2d10760a3c7f7d507f81a9faeb60818b7eeb195ffaa44688
MD5 558ca8aea55f962fd695471e8cfd2a13
BLAKE2b-256 78e33945fcd5e593321995b337290b37ccc7024bf2518ebc9f039f0eaf5f6513

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tol_colors-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.6 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

Hashes for tol_colors-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c956d3054161068d559506160f82fabec58e6d7a6ef62815ae2e29e6330a661b
MD5 d9cbe669997cd4294036579e8eaa4e35
BLAKE2b-256 0d1e70a3c91daa7209e496efe8c296800ec044ecf1f4b8532fe614a67a468000

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