Simpsons¶
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.
pal_simpsons(palette='springfield', alpha=1.0)
¶
The Simpsons color palette.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
palette
|
str
|
Palette name. Currently only "springfield" is available. |
'springfield'
|
alpha
|
float
|
Transparency level, between 0 and 1. |
1.0
|
Returns:
Type | Description |
---|---|
PaletteFunc
|
A callable that takes n and returns a color sequence. |
Raises:
Type | Description |
---|---|
ValueError
|
If the palette name is unknown or alpha is invalid. |
ggsci.scales
¶
Plotnine scales for ggsci palettes.
scale_colour_simpsons = scale_color_simpsons
module-attribute
¶
scale_color_simpsons
dataclass
¶
Bases: scale_discrete
The Simpsons color scale.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
palette
|
InitVar[str]
|
Palette name. Currently only "springfield" is available. |
'springfield'
|
alpha
|
InitVar[float]
|
Transparency level, between 0 and 1. |
1.0
|
scale_fill_simpsons
dataclass
¶
Bases: scale_discrete
The Simpsons fill scale.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
palette
|
InitVar[str]
|
Palette name. Currently only "springfield" is available. |
'springfield'
|
alpha
|
InitVar[float]
|
Transparency level, between 0 and 1. |
1.0
|