seaborn.set_color_codes

seaborn.set_color_codes(palette='deep')

Change how matplotlib color shorthands are interpreted.

Calling this will change how shorthand codes like “b” or “g” are interpreted by matplotlib in subsequent plots.

Parameters:

palette : {deep, muted, pastel, dark, bright, colorblind}

Named seaborn palette to use as the source of colors.

See also

set
Color codes can be set through the high-level seaborn style manager.
set_palette
Color codes can also be set through the function that sets the matplotlib color cycle.

Examples

Map matplotlib color codes to the default seaborn palette.

>>> import matplotlib.pyplot as plt
>>> import seaborn as sns; sns.set()
>>> sns.set_color_codes()
>>> _ = plt.plot([0, 1], color="r")
../_images/seaborn-set_color_codes-1.png

Use a different seaborn palette.

>>> sns.set_color_codes("dark")
>>> _ = plt.plot([0, 1], color="g")
>>> _ = plt.plot([0, 2], color="m")
../_images/seaborn-set_color_codes-2.png