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 always ensuring the color map scales in intensity from black to white.
A few simple flavors of cubehelix:
- Default color map settings produce the standard "cubehelix":
cubehelix.cmap()
. - 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)
.
>>> import cubehelix
>>> cx = cubehelix.cmap(start=0., rot=-0.5)
>>> plot(x,cmap=cx)
From source:
setup.py install
or with pip:
pip install git+git://github.com/jradavenport/cubehelix.git