Skip to main content

A Python package mapping 2D coordinates to colors based on different 2D color maps.

Project description

Colormap 2D Python Package

This package allows to map 2D coordinates to different 2D color maps. It can be installed from PyPi.

The following color maps are available:

Bremm Cube Diagonal Schumann
ColorMap2DBremm ColorMap2DCubeDiagonal ColorMap2DSchumann
Steiger Teuling 2 Ziegler
ColorMap2DSteiger ColorMap2DTeuling2 ColorMap2DZiegler

The package is based on

M. Steiger, J. Bernard, S. Thum, S. Mittelstädt, M. Hutter, D. A. Keim, and J. Kohlhammer, “Explorative Analysis of 2D Color Maps,” in International Conferences in Central Europe on Computer Graphics, Visualization and Computer Vision, 2015, vol. 23, pp. 151–160.

For a JavaScript implementation, refer to the Color2D project by Dominik Jäckle.

Example

Basic usage with normalized inputs (i.e., x- and y-coordinates ranging from 0 to 1):

from pycolormap_2d import ColorMap2DBremm

# Create the color map object.
cmap = ColorMap2DBremm()

# Get the color value.
color = cmap(0.2, 0.6)

Optionally, ranges for the input x and y input ranges can be passed during object creation:

from pycolormap_2d import ColorMap2DBremm

# Create the color map object.
cmap = ColorMap2DBremm(range_x=(-10, 30), range_y=(1, 11))

# Get the color value.
color = cmap(10.0, 8.5)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

pycolormap_2d-1.0.7-py3-none-any.whl (1.3 MB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for pycolormap_2d-1.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 7d3a676e491dc332e648814985f29837e1a7db1c6be5d8e8718f08d6c4e23858
MD5 7f378e6db6a6d62e64ac8f6467f3cea0
BLAKE2b-256 78912fc7db98949bc430181ceb866d0100e96b4b5ad815308a94024e3d34850a

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