python-igraph API reference

List of all classes, functions and methods in python-igraph

class documentation

class AdvancedGradientPalette(Palette):

View In Hierarchy

Advanced gradient that consists of more than two base colors.

Example:

>>> pal = AdvancedGradientPalette(["red", "black", "blue"], n=9)
>>> pal.get(2)
(0.5, 0.0, 0.0, 1.0)
>>> pal.get(7)
(0.0, 0.0, 0.75, 1.0)
Method __init__ Creates an advanced gradient palette
Instance Variable _indices Undocumented
Instance Variable _colors Undocumented
Instance Variable _dists Undocumented
Method _get Returns the color corresponding to the given color index.

Inherited from Palette:

Method clear_cache Clears the result cache.
Method get Returns the given color from the palette.
Method get_many Returns multiple colors from the palette.
Property length Returns the number of colors in this palette
Method __len__ Returns the number of colors in this palette
Method __plot__ Plots the colors of the palette on the given Cairo context
Method __repr__ Undocumented
Instance Variable _length Undocumented
Instance Variable _cache Undocumented
def __init__(self, colors, indices=None, n=256):

Creates an advanced gradient palette

Parameterscolorsthe colors in the gradient.
indicesthe color indices belonging to the given colors. If None, the colors are distributed equidistantly
nthe total number of colors in the palette
_indices =

Undocumented

_colors =

Undocumented

_dists =

Undocumented

def _get(self, v):

Returns the color corresponding to the given color index.

Parametersvnumerical index of the color to be retrieved
Returnsa 4-tuple containing the RGBA values
API Documentation for igraph, generated by pydoctor 21.2.2.