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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: tol_colors-1.2.0.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.59.0 CPython/3.8.8

File hashes

Hashes for tol_colors-1.2.0.tar.gz
Algorithm Hash digest
SHA256 2f4832dd8aa80ed354dea34c50896d824c3edfe368e2c262e907ba99e1098768
MD5 3d17561f76d9c2b3276a0e04a1e3c6f9
BLAKE2b-256 83e31e50a1720c76dd68ad9a5334fd922681e75e4611577dd6d99740cb874e5e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tol_colors-1.2.0-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.59.0 CPython/3.8.8

File hashes

Hashes for tol_colors-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a77427955e262caa5b7c38322987ffc7b96b163b355274bde149104c55de5471
MD5 aff01fb1a5c4c45a70ca9158fda4bbbe
BLAKE2b-256 b635b2ed6ec1d91c4abe7c4295e13000e62ec15f6c7bf342c0ae90b9d4c7d57d

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