python table类_哪些 Python 库让你相见恨晚?

1、Palettable简介小菜鸟献丑一个前段时间爱上的一个Python可视化配色库:Palettable;

非常适合我等对图颜值有追求的人,狗头2333;

Palettable提供丰富的colormap(3000+种),为brewer2mpl的继承者。为Python可视化而生的库

2、Palettable具有多少Colormap?16大类

Palettable所有的颜色条(Colormap)可分16大类:palettable.cartocolors.diverging

palettable.cartocolors.qualitative

palettable.cartocolors.sequential

palettable.cmocean.diverging

palettable.cmocean.sequential

palettable.colorbrewer.diverging

palettable.colorbrewer.qualitative

palettable.colorbrewer.sequential

palettable.lightbartlein.diverging

palettable.lightbartlein.sequential

palettable.scientific.diverging

palettable.scientific.sequential

palettable.matplotlib(matplotlib此时只是个弟弟)

palettable.mycarta

palettable.tableau

palettable.wesanderson共计1587种Colormap

16大类下包含数个小类,共计1587种Colormap(每种Colormap还具有自己的反向颜色条,加“_r”即可使用,类似Matplotlib,所以palettable中包含3000+种Colormap);

这是什么概念了,Matplotlib中只有81种Colormap,而且Matplotlib也被包含在了palettable库中。

之前全部爬下来了,以下列出部分,感兴趣的小伙伴可以找我免费索取:

palettable.cartocolors.diverging.ArmyRose_2

palettable.cartocolors.diverging.ArmyRose_3

palettable.cartocolors.diverging.ArmyRose_4

palettable.cartocolors.diverging.ArmyRose_5

palettable.cartocolors.diverging.ArmyRose_6

palettable.cartocolors.diverging.ArmyRose_7

palettable.cartocolors.diverging.Earth_2

palettable.cartocolors.diverging.Earth_3

palettable.cartocolors.diverging.Earth_4

palettable.cartocolors.diverging.Earth_5

palettable.cartocolors.diverging.Earth_6

palettable.cartocolors.diverging.Earth_7

palettable.cartocolors.diverging.Fall_2

palettable.cartocolors.diverging.Fall_3

palettable.cartocolors.diverging.Fall_4

palettable.cartocolors.diverging.Fall_5

palettable.cartocolors.diverging.Fall_6

palettable.cartocolors.diverging.Fall_7

palettable.cartocolors.diverging.Geyser_2

palettable.cartocolors.diverging.Geyser_3

palettable.cartocolors.diverging.Geyser_4

3、Palettable中ColormapCheetSheet

将1587中Colormap整理成了CheetSheet,文件比较大,感兴趣的小伙伴可以找我免费索取

4、Palettable使用

import palettable#导入palettable库

import matplotlib.pyplot as plt

plt.figure(dpi=150)

#取palettable包中颜色

#取一种颜色

plt.subplot(1,2,1)

plt.bar(range(5),range(1,6),color=palettable.colorbrewer.qualitative.Dark2_7.mpl_colors[3])

#取多种颜色

plt.subplot(1,2,2)

plt.bar(range(5),range(1,6),color=palettable.colorbrewer.qualitative.Dark2_7.mpl_colors)感觉美美哒##更新下

github: jiffyclub/palettable

目前star和fork都不多,可能知道的人还不多:

更多关于Palettable的使用细节,请戳:

感觉有用,给我这小透明点个赞呗,2333

2020.08.04夜更新~~~

提交这个回答后有不少小伙伴私信索要Palettable colormap,共计51页。

欢迎微信搜索:pythonic生物人

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值