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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: tol_colors-1.1.0.tar.gz
  • Upload date:
  • Size: 6.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.1.0.tar.gz
Algorithm Hash digest
SHA256 39defc9a99c4e29f394117bbbc70dc85d6f20bbc84220c798d1d8b088a340569
MD5 8143659e51fc207c6bb9d0920a65d11b
BLAKE2b-256 10b9b1d6bbfda160b8f26a9ae402724371b6e715d8ec588dd1e3c8259483790f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tol_colors-1.1.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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e1fed242aca579e3f8b2787d08a97dcdabdbb2517f9651c91a214357e18f2aaf
MD5 aeee30b60634e98722ed2a2e6d9a2794
BLAKE2b-256 dfb51574fd71b07c7d6f0a94ddfb3f78fdc31323db66579ffdabe7a8c70af988

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