python-igraph API reference

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

class documentation

class ClusterColoringPalette(PrecalculatedPalette):

View In Hierarchy

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.

Method __init__ No summary

Inherited from PrecalculatedPalette:

Method _get 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

Inherited from Palette (via PrecalculatedPalette):

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, n):

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.

API Documentation for python-igraph, generated by pydoctor 21.2.2 at 2021-03-26 11:21:53.