Skip to content

Gephi

ggsci.palettes

Palette generators for ggsci.

This module provides palette functions that either return a callable for discrete palettes or a sequence of colors for continuous palettes.

GEPHI_PALETTES = tuple(GEPHI_FILTERS) module-attribute

pal_gephi(palette='default', alpha=1.0)

Gephi generative color palette.

Parameters:

Name Type Description Default
palette str

Palette name. See GEPHI_PALETTES for available options.

'default'
alpha float

Transparency level, between 0 and 1.

1.0
Details

Uses NumPy's global random state directly. Call numpy.random.seed() before generating colors or drawing a plot to get reproducible output.

Returns:

Type Description
PaletteFunc

A callable that takes n and returns a color sequence.

Raises:

Type Description
ValueError

If the palette name, alpha, or requested size is invalid.

ggsci.scales

Plotnine scales for ggsci palettes.

scale_colour_gephi = scale_color_gephi module-attribute

scale_color_gephi dataclass

Bases: scale_discrete

Gephi generative color scale.

Parameters:

Name Type Description Default
palette InitVar[str]

Palette name. See GEPHI_PALETTES for available options.

'default'
alpha InitVar[float]

Transparency level, between 0 and 1.

1.0
Details

Uses NumPy's global random state directly. Call numpy.random.seed() before drawing the plot for reproducible output.

scale_fill_gephi dataclass

Bases: scale_discrete

Gephi generative fill scale.

Parameters:

Name Type Description Default
palette InitVar[str]

Palette name. See GEPHI_PALETTES for available options.

'default'
alpha InitVar[float]

Transparency level, between 0 and 1.

1.0
Details

Uses NumPy's global random state directly. Call numpy.random.seed() before drawing the plot for reproducible output.