python-igraph manual

For using igraph from Python

   Home       Trees       Indices       Help   
Package igraph :: Package drawing :: Module colors :: Class ClusterColoringPalette
[hide private]

Class ClusterColoringPalette

source code

      object --+        
               |        
         Palette --+    
                   |    
PrecalculatedPalette --+
                       |
                      ClusterColoringPalette

A palette suitable for coloring vertices when plotting a clustering.

This palette tries to make sure that the colors are easily distinguishable. This is achieved by using a set of base colors and their lighter and darker variants, depending on the number of elements in the palette.

When the desired size of the palette is less than or equal to the number of base colors (denoted by n), only the bsae colors will be used. When the size of the palette is larger than n but less than 2*n, the base colors and their lighter variants will be used. Between 2*n and 3*n, the base colors and their lighter and darker variants will be used. Above 3*n, more darker and lighter variants will be generated, but this makes the individual colors less and less distinguishable.

Instance Methods [hide private]
 
__init__(self, n)
Creates the palette backed by the given list.
source code

Inherited from PrecalculatedPalette (private): _get

Inherited from Palette: __getitem__, __len__, __plot__, __repr__, clear_cache, get, get_many

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from Palette: length

Inherited from object: __class__

Method Details [hide private]

__init__(self, n)
(Constructor)

source code 

Creates the palette backed by the given list. The list must contain RGBA quadruplets or color names, which will be resolved first by color_name_to_rgba(). Anything that is understood by color_name_to_rgba() is OK here.

Overrides: object.__init__
(inherited documentation)

   Home       Trees       Indices       Help