0.11.2
  • Gallery
  • Tutorial
  • API
  • Site
      • Introduction
      • Release notes
      • Installing
      • Example gallery
      • Tutorial
      • API reference
      • Citing
      • Archive
  • Page
      • seaborn.set_palette

seaborn.set_palette¶

seaborn.set_palette(palette, n_colors=None, desat=None, color_codes=False)¶

Set the matplotlib color cycle using a seaborn palette.

Parameters
paletteseaborn color paltte | matplotlib colormap | hls | husl

Palette definition. Should be something that color_palette() can process.

n_colorsint

Number of colors in the cycle. The default number of colors will depend on the format of palette, see the color_palette() documentation for more information.

desatfloat

Proportion to desaturate each color by.

color_codesbool

If True and palette is a seaborn palette, remap the shorthand color codes (e.g. “b”, “g”, “r”, etc.) to the colors from this palette.

See also

color_palette

build a color palette or set the color cycle temporarily in a with statement.

set_context

set parameters to scale plot elements

set_style

set the default parameters for figure style

Examples

>>> set_palette("Reds")
>>> set_palette("Set1", 8, .75)

Back to top

© Copyright 2012-2021, Michael Waskom. Created using Sphinx 3.3.1.