Coder Social home page Coder Social logo

akronix / colormap Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cokelaer/colormap

1.0 1.0 0.0 360 KB

Utilities to visualise and create matplotlib colormaps and various color codecs

License: BSD 3-Clause "New" or "Revised" License

Python 20.76% Jupyter Notebook 79.24%

colormap's Introduction

COLORMAP documentation

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

https://secure.travis-ci.org/cokelaer/colormap.png https://coveralls.io/repos/cokelaer/colormap/badge.png?branch=master https://landscape.io/github/cokelaer/colormap/master/landscape.png
version:Python 2.7, 3.3, 3.4, 3.5, 3.6
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/

colormap's People

Contributors

cokelaer avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.