+
Skip to content

eumiro/colormap

 
 

Repository files navigation

COLORMAP documentation

Please see : http://colormap.readthedocs.io/ for an up-to-date documentation.

https://github.com/cokelaer/colormap/actions/workflows/ci.yml/badge.svg?branch=master https://coveralls.io/repos/cokelaer/colormap/badge.png?branch=master
version:Python 3.7, 3.8, 3.9, 3.10
contributions:Please join https://github.com/cokelaer/colormap
issues:Please use https://github.com/cokelaer/colormap/issues
notebook:Please see https://github.com/cokelaer/colormap/tree/master/notebooks

What is it ?

colormap package provides simple utilities to convert colors between RGB, HEX, HLS, HUV and a class to easily build colormaps for matplotlib. All matplotlib colormaps and some R colormaps are available altogether. The plot_colormap method (see below) is handy to quickly pick up a colormaps and the test_colormap is useful to see test a new colormap.

Installation

pip install colormap

Example

  • Create your own colormap from red to green colors with intermediate color as whitish (diverging map from red to green):

    c = Colormap()
    mycmap = c.cmap( {'red':[1,1,0], 'green':[0,1,.39], 'blue':[0,1,0]})
    cmap = c.test_colormap(mycmap)
    
  • Even simpler if the colormap is linear:

    c = Colormap()
    mycmap = c.cmap_linear('red', 'white', 'green(w3c)')
    cmap = c.test_colormap(mycmap)
    

http://colormap.readthedocs.io/en/latest/_images/index-1.png

  • check out the available colormaps:

    c = Colormap()
    c.plot_colormap('diverging')
    

http://colormap.readthedocs.io/en/latest/_images/colormaps.png

See online documentation for details: http://colormap.readthedocs.io/

changelog

Version Description
1.0.5
  • remove Python3.6 and added Python3.10 to CI action
  • Fix issue in setup reported in cokelaer#14
  • add requirements in MANIFEST
  • applied black on all files

About

Utilities to visualise and create matplotlib colormaps and various color codecs

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Jupyter Notebook 79.0%
  • Python 21.0%
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载