Skip to main content

Color maps for continuous quantitative data

Project description

The Chromophile color maps are designed for the accurate display of quantitative data. This package contains the Chromophile color maps in both Matplotlib and Bokeh formats.

Installation

The Chromophile color maps are distributed as a Python package. To install it, open a terminal and execute:

pip install chromophile

Or, in IPython or Jupyter, use the %pip magic command:

%pip install chromophile

The chromophile package has no required dependencies. To use the Chromophile color maps with Matplotlib, the matplotlib package must be available at the time chromophile is imported.

The tools used to develop the Chromophile color maps, and the source for the online documentation, are in a separate package called chromophile-dev. Most users will not need this package.

Usage

To use the color maps, import the Chromophile package:

>>> import chromophile as cp

The Chromophile color maps are stored in two formats:

  • Matplotlib Colormap objects are stored in cmap. If Matplotlib is not available, cmap will equal None. The color maps are also added to Matplotlib’s color map registry.

  • Bokeh palettes are stored in palette.

Individual color maps can be accessed either as dictionary items or as attributes of these objects. For example:

>>> cp.cmap.cp_dawn
<matplotlib.colors.ListedColormap object at ...>
>>> cp.palette['cp_peacock']
('#06003c', '#06013d', '#06023e', '#07043e', ...)

The same color map is returned regardless of how it is accessed:

>>> cp.cmap.cp_lemon_lime is cp.cmap['cp_lemon_lime']
True
>>> cp.palette.cp_blue is cp.palette['cp_blue']
True

Most IDEs should support tab completion for cmap and palette.

The available color maps can be listed using the .keys() method of cmap or palette or by calling dir() on either of these objects. They are also displayed in the online documentation.

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

chromophile-1.0.5.tar.gz (54.0 kB view details)

Uploaded Source

Built Distribution

chromophile-1.0.5-py3-none-any.whl (50.2 kB view details)

Uploaded Python 3

File details

Details for the file chromophile-1.0.5.tar.gz.

File metadata

  • Download URL: chromophile-1.0.5.tar.gz
  • Upload date:
  • Size: 54.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.2

File hashes

Hashes for chromophile-1.0.5.tar.gz
Algorithm Hash digest
SHA256 2a7d317af950dbf76dad7775c4a690e3e376a642ddd4b44d3178f31b498dd11c
MD5 018b39ac1a20dd1244cb84c40f3e5eb1
BLAKE2b-256 32115948d48d79b966ff737ef1195ffe1571d31e9e658f3ecdc0b80ee17d5c63

See more details on using hashes here.

File details

Details for the file chromophile-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: chromophile-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 50.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.2

File hashes

Hashes for chromophile-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 0d15f5f654420fac9c5e26ef923a25dbede112f7d41f354dad94d2b5c74d54fd
MD5 aa1a85391549549d6504f169a1bf81d6
BLAKE2b-256 13088acee4c47dd7730d66c7887a10f8bdd77e12d1c26a2abf912c26e2ead648

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