1、color_palette() 函数

该函数是seaborn选取颜色关键函数

color_palette() will accept the name of any seaborn palette or matplotlib colorma

语法:seaborn.color_palette(palette=none, n_colors=none, desat=none)

2、 seaborn可用调色盘

分三大类:‘sequential’(渐变色), ‘diverging’(不可描述,看下图), ‘qualitative’(各种颜色区分鲜明)

choose_colorbrewer_palette函数

该函数可以预览各种颜色盘, 只能在jupyter notebook中使用。

下面详细介绍上面三类颜色。

qualitative color palettes

to distinguish discrete chunks of data that do not have an inherent ordering,分如下几类:

1、deep, muted, pastel, bright, dark, colorblind

2、hls

3、husl

4、palettable 5、xkcd

6、传入颜色list

从上到下依次为:deep, muted, pastel, bright, dark, colorblind

xkcd,详细可参考 :python可视化学习之matplotlib内置单颜色

sequential color palettes

is appropriate when data range from relatively low or uninteresting values to relatively high or interesting values

1、”blues”这类

2、’cubehelix’,seaborn.cubehelix_palette(n_colors=6, start=0, rot=0.4, gamma=1.0, hue=0.8, light=0.85, dark=0.15, reverse=false, as_cmap=false)

3、传统色的渐变色,light_palette()、dark_palette() 

diverging color palettes

for data where both large low and high values are interesting.

1、diverging_palette()

到此这篇关于python可视化学习之seaborn调色盘的文章就介绍到这了,更多相关python seaborn调色盘内容请搜索www.887551.com以前的文章或继续浏览下面的相关文章希望大家以后多多支持www.887551.com!