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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for chromophile-1.0.7.tar.gz
Algorithm Hash digest
SHA256 fd15b2def9b45a341071fc7f18a8fcfbfb777934a2787642a14e50ec6065cfea
MD5 381c3d0c8dbcad26d1b90558008b04f6
BLAKE2b-256 f005d84f8524fbf673ef86f1830a5e0abee094022ae11a0ae86b5caf32cafed5

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for chromophile-1.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 c9ca51a012543e344955ecad03fc18b5f644099263ede2360980d02cbb483f69
MD5 f02c22284ba3a04ac3169dbfcbce198a
BLAKE2b-256 c07e13c3e10630e599e4aea1c0b69b8e01fa684c479d866531c986b8a34da0b0

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