module graphhelper._colormap

Inheritance diagram of pyensae.graphhelper._colormap

Short summary

module pyensae.graphhelper._colormap

CorrPlot functionalities.

It comes from corrplot.py which I copied here because the module does not properly work on Python 3 (import issues). See also biokit license.

author

Thomas Cokelaer

references

http://cran.r-project.org/web/packages/corrplot/vignettes/corrplot-intro.html

source on GitHub

Classes

class

truncated documentation

Color

Lists of known colors.

Colormap

Snippets of code from colormap/colors.py, …

Functions

function

truncated documentation

cmap_builder

Returns a colormap object compatible with matplotlib If only parameter name is provided, it should be a known matplotlib …

Properties

property

truncated documentation

colormaps

diverging_black

Methods

method

truncated documentation

__init__

_get_colormap_mpl

_get_diverging_black

cmap

Returns a colormap object to be used within matplotlib

cmap_linear

Provides 3 colors in format accepted by Color

set_hex

Converts a string like #AABBCC into (red, green, blue).

Documentation

CorrPlot functionalities.

It comes from corrplot.py which I copied here because the module does not properly work on Python 3 (import issues). See also biokit license.

author

Thomas Cokelaer

references

http://cran.r-project.org/web/packages/corrplot/vignettes/corrplot-intro.html

source on GitHub

class pyensae.graphhelper._colormap.Color(name)

Bases: object

Lists of known colors.

source on GitHub

Parameters

name – hexadecimal or name

source on GitHub

__init__(name)
Parameters

name – hexadecimal or name

source on GitHub

set_hex(name)

Converts a string like #AABBCC into (red, green, blue).

source on GitHub

class pyensae.graphhelper._colormap.Colormap

Bases: object

Snippets of code from colormap/colors.py, LICENSE.

source on GitHub

_get_colormap_mpl()
_get_diverging_black()
cmap(colors=None, reverse=False, N=256)

Returns a colormap object to be used within matplotlib :param dict colors: a dictionary that defines the RGB colors to be

used in the colormap. See get_cmap_heat() for an example.

Parameters
  • reverse (bool) – reverse the colormap is set to True (defaults to False)

  • N (int) – Defaults to 50

source on GitHub

cmap_linear(color1, color2, color3, reverse=False, N=256)

Provides 3 colors in format accepted by Color

red = Color('red')
cmap = cmap_linear(red, 'white', '#0000FF')

source on GitHub

pyensae.graphhelper._colormap.cmap_builder(name, name2=None, name3=None)

Returns a colormap object compatible with matplotlib If only parameter name is provided, it should be a known matplotlib colormap name (e.g., jet). If name2 is provided, then a new colormap is created going from the color name to the color name2 with a linear scale. Finally, if name3 is provided, a linear scaled colormap is built from color name to color name3 with the intermediate color being the name2. Matplotlib colormap map names Source: colormap/get_cmap.py, LICENSE).

source on GitHub