python-igraph manual

For using igraph from Python

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

Class PrecalculatedPalette

source code

object --+    
         |    
   Palette --+
             |
            PrecalculatedPalette
Known Subclasses:

A palette that returns colors from a pre-calculated list of colors

Instance Methods [hide private]
 
__init__(self, l)
Creates the palette backed by the given list.
source code
 
_get(self, v)
This method will only be called if the requested color index is outside the size of the palette.
source code

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, l)
(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__

_get(self, v)

source code 

This method will only be called if the requested color index is outside the size of the palette. In that case, we throw an exception

Parameters:
  • v - numerical index of the color to be retrieved
Returns:
a 4-tuple containing the RGBA values
Overrides: Palette._get

   Home       Trees       Indices       Help