# Exemplarily for diverging_hcl, works for
# all other HCL palettes as well.
from colorspace import diverging_hcl
= diverging_hcl()
pal = (8, 2)) pal.swatchplot(figsize
Palette Swatch Plot
Description
Interfacing the main swatchplot function. Plotting the spectrum of the current color palette.
Usage
rainbow.swatchplot(n=7, **kwargs)
Arguments
-
n
int
- Number of colors, defaults to 7.
-
**kwargs
- forwarded to swatchplot.
Examples
# Handing over a series of additional arguments
# forwarded to swatchplot()
= 21, figsize = (8, 2),
pal.swatchplot(n = False, cvd = "deutan") show_names
= 21, figsize = (8, 2),
pal.swatchplot(n = False,
show_names = ["protan", "deutan", "tritan", "desaturate"]) cvd