Seaborn调色板的使用与所有颜色组合

因为花生有20条染色体,“tab20”可能比较合适,也可以其他配色自己调整

import seaborn as sns
import numpy as np
import matplotlib.pyplot as plt
palette= sns.color_palette("tab20")
sns.palplot(palette)
plt.show()
tab20.png

可以截取一部分进行使用,比如截取前四个:

palette= sns.color_palette("tab20",4)

如下图所示:

tab20-4.png
也可以基于此进行重复使用
palette= sns.color_palette("tab20", 4)
palette= sns.color_palette(palette, 20)
sns.palplot(palette)
tab20-4-20.png
采用前六个并且重复:
tab20-6.png

tab20-6-20.png

**seaborn所有内置的调色板名称如下。内容来自知乎和CSDN **

还在忧愁在使用seaborn过程中怎样将图绘制的好看?!! 别担心,下表是seaborn调色板所有组合颜色,任君挑选!!


颜色组合名称(首字母大写) 调色显示
1.Accent
image.png
2.Accent_r
image.png
3.Blues
image.png
4.Blues_r
image.png
5.BrBG
image.png
6.BrBG_r
image.png
相信聪明的你们发现了颜色名称的某个规律 XXX_r 与 XXX 大多只是颜色顺序相反,故以下只显示 XXX
7.BuGn
image.png
8.BuPu
image.png
9.CMRmap
image.png
10.Dark2
image.png
11.Dark2_r
image.png
12.GnBu
image.png
13.Greens
image.png
14.Greys
image.png
15.OrRd
image.png
16.Oranges
image.png
17.PRGn
image.png
18.Paired
image.png
19.Paired_r
image.png
20.Pastel1
image.png
21.Pastel1_r
image.png
22.Pastel2
image.png
23.Pastel2_r
image.png
24.PiYG
image.png
25.PuBu
image.png
26.PuBuGn
image.png
27.PuOr
image.png
28.PuRd
image.png
29.Purples
image.png
30.RdBu
image.png
31.RdYlBu
image.png
32.RdYlGn
image.png
33.Reds
image.png
34.Set1
image.png
35.Set1_r
image.png
36.Set2
image.png
37.Set2_r
image.png
38.Set3
image.png
39.Set3_r
image.png
40.Spectral
image.png
41.Wistia
image.png
42.YlGn
image.png
43.YlGnBu
image.png
44.YlOrBr
image.png
45.YlOrRd
image.png
颜色组合名称(首字母小写) 调色板显示
1.afmhot
image.png
2.autumn
image.png
3.binary
image.png
4.bone
image.png
5.brg
image.png
6.bwr
image.png
7.cividis
image.png
8.cool
image.png
9.coolwarm
image.png
10.copper
image.png
11.cubehelix
image.png
12.flag
image.png
13.gist_earth
image.png
14.gist_gray
image.png
15.gist_heat
image.png
16.gist_ncar
image.png
17.gist_rainbow
image.png
18.gist_stern
image.png
19.gist_yarg
image.png
20.gnuplot
image.png
21.gnuplot2
image.png
22.gray
image.png
23.hot
image.png
24.hsv
image.png
25.icefire
image.png
26.inferno
image.png
27.jet ValueError: No.
28.magma
image.png
29.mako
image.png
30.nipy_spectral
image.png
31.ocean
image.png
32.pink
image.png
33.plasma
image.png
34.prism
image.png
35.rainbow
image.png
36.rocket
image.png
37.seismic
image.png
38.spring
image.png
39.summer
image.png
40.1.tab10
image.png
40.2.tab10_r
image.png
41.1.tab20
image.png
41.2.tab20_r
image.png
42.1.tab20c
image.png
42.2.tab20c_r
image.png
43.terrain
image.png
44.twilight
image.png
45.twilight_shifted
image.png
46.viridis
image.png
47.vlag
image.png
48.winter
image.png
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

友情链接更多精彩内容