midlearn.scale_fill_theme
- midlearn.scale_fill_theme(theme: str | list[str] | color_theme, midpoint: float = 0, **kwargs) scale_fill_theme_d | scale_fill_theme_c [source]
Scale for ‘fill’ aesthetics of plotnine graphics.
Generate either a discrete or continuous fill scale depending on the theme type.
- Parameters:
theme (str or list of str or color_theme) – The name of the theme (str), a list of custom colors (list[str]), or an existing color_theme object.
midpoint (float, default 0) – The value used as the center for the ‘diverging’ fill scale.
**kwargs (dict) – Additional keyword arguments passed to the constructor of scales.
- Returns:
A plotnine color scale object based on the theme’s type.
- Return type:
scale_fill_theme_d or scale_fill_theme_c
See also
scale_color_theme
The corresponding scale function for the ‘color’ aesthetic.