Skip to content

A full implementation of Dave Green's "cubehelix" colormap for Python

License

Notifications You must be signed in to change notification settings

jradavenport/cubehelix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cubehelix

A full implementation of Dave Green's cubehelix colormap for Python.

The user can adjust all parameters of the cubehelix algorithm. This enables much greater flexibility in choosing color maps, while (by default) ensuring the color map scales in brightness from black to white.

A few simple example flavors of cubehelix:

  • Default color map settings produce the standard "cubehelix": cubehelix.cmap()

Reversed Standard cubehelix scheme

  • Create color map in only blues: cubehelix.cmap(rot=0, start=0)
  • Create reverse (white to black) backwards through the rainbow once: cubehelix.cmap(rot=1, reverse=True)

A nice blue cubehelix scheme

a better rainbow

Discussion and examples shown on my blog: If We Assume

Basic Usage

import cubehelix
cx = cubehelix.cmap(start=0., rot=-0.5)
plot(x,cmap=cx)

Installation

Download:

  • Place cubehelix.py in your Python path.

From source::

setup.py install

or with pip::

pip install git+git://github.com/jradavenport/cubehelix.git

About

A full implementation of Dave Green's "cubehelix" colormap for Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages