python matplotlib包图像配色方案分享


Posted in Python onMarch 14, 2020

可选的配色方案:

Accent, Accent_r, Blues, Blues_r, BrBG, BrBG_r, BuGn, BuGn_r, BuPu, BuPu_r, CMRmap, CMRmap_r, Dark2, Dark2_r, GnBu, GnBu_r, Greens, Greens_r, Greys, Greys_r, OrRd, OrRd_r, Oranges, Oranges_r, PRGn, PRGn_r, Paired, Paired_r, Pastel1, Pastel1_r, Pastel2, Pastel2_r, PiYG, PiYG_r, PuBu, PuBuGn, PuBuGn_r, PuBu_r, PuOr, PuOr_r, PuRd, PuRd_r, Purples, Purples_r, RdBu, RdBu_r, RdGy, RdGy_r, RdPu, RdPu_r, RdYlBu, RdYlBu_r, RdYlGn, RdYlGn_r, Reds, Reds_r, Set1, Set1_r, Set2, Set2_r, Set3, Set3_r, Spectral, Spectral_r, Wistia, Wistia_r, YlGn, YlGnBu, YlGnBu_r, YlGn_r, YlOrBr, YlOrBr_r, YlOrRd, YlOrRd_r, afmhot, afmhot_r, autumn, autumn_r, binary, binary_r, bone, bone_r, brg, brg_r, bwr, bwr_r, cividis, cividis_r, cool, cool_r, coolwarm, coolwarm_r, copper, copper_r, cubehelix, cubehelix_r, flag, flag_r, gist_earth, gist_earth_r, gist_gray, gist_gray_r, gist_heat, gist_heat_r, gist_ncar, gist_ncar_r, gist_rainbow, gist_rainbow_r, gist_stern, gist_stern_r, gist_yarg, gist_yarg_r, gnuplot, gnuplot2, gnuplot2_r, gnuplot_r, gray, gray_r, hot, hot_r, hsv, hsv_r, inferno, inferno_r, jet, jet_r, magma, magma_r, nipy_spectral, nipy_spectral_r, ocean, ocean_r, pink, pink_r, plasma, plasma_r, prism, prism_r, rainbow, rainbow_r, seismic, seismic_r, spring, spring_r, summer, summer_r, tab10, tab10_r, tab20, tab20_r, tab20b, tab20b_r, tab20c, tab20c_r, terrain, terrain_r, viridis, viridis_r, winter, winter_r

RGB对照表:https://www.114la.com/other/rgb.htm

常用的几个:

python matplotlib包图像配色方案分享

示例代码:

cm='Spectral'  #hot bone cool copper gray hsv inferno jet magma pink plasma summer viridis bwr ocean rainbow coolwarm Spectral......................
norm = matplotlib.colors.Normalize(vmin=min, vmax=max) 
map=plt.imshow(plt_arr,interpolation='nearest',cmap=cm,norm=norm, origin='upper') # plt_arr是要显示的数据
mydpi=1000
plt.savefig("filename.png", dpi=mydpi ,bbox_inches='tight', pad_inches=0) # ,bbox_inches='tight' less white area
plt.show()

图像实例:

hsv

python matplotlib包图像配色方案分享

hot

python matplotlib包图像配色方案分享

cool

python matplotlib包图像配色方案分享

rainbow

python matplotlib包图像配色方案分享

gist_earth

python matplotlib包图像配色方案分享

以上这篇python matplotlib包图像配色方案分享就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持三水点靠木。

Python 相关文章推荐
python使用7z解压软件备份文件脚本分享
Feb 21 Python
整理Python最基本的操作字典的方法
Apr 24 Python
Python绘制正余弦函数图像的方法
Aug 28 Python
python通过配置文件共享全局变量的实例
Jan 11 Python
python实现微信自动回复及批量添加好友功能
Jul 03 Python
python Gunicorn服务器使用方法详解
Jul 22 Python
python try except返回异常的信息字符串代码实例
Aug 15 Python
python中的 zip函数详解及用法举例
Feb 16 Python
基于python代码批量处理图片resize
Jun 04 Python
python中reload重载实例用法
Dec 15 Python
如何在Python中创建二叉树
Mar 30 Python
Python控制台输出俄罗斯方块的方法实例
Apr 17 Python
python 使用cx-freeze打包程序的实现
Mar 14 #Python
python matplotlib imshow热图坐标替换/映射实例
Mar 14 #Python
python pyqtgraph 保存图片到本地的实例
Mar 14 #Python
Python 实现将大图切片成小图,将小图组合成大图的例子
Mar 14 #Python
python numpy实现多次循环读取文件 等间隔过滤数据示例
Mar 14 #Python
python matplotlib 绘图 和 dpi对应关系详解
Mar 14 #Python
python 工具 字符串转numpy浮点数组的实现
Mar 14 #Python
You might like
PHP文件读写操作之文件写入代码
2011/01/13 PHP
PHP YII框架开发小技巧之模型(models)中rules自定义验证规则
2015/11/16 PHP
PHP目录与文件操作技巧总结(创建,删除,遍历,读写,修改等)
2016/09/11 PHP
javascript 强制刷新页面的实现代码
2009/12/13 Javascript
利用jQuery 实现GridView异步排序、分页的代码
2010/02/06 Javascript
jQuery表单域选择器用法分析
2015/02/10 Javascript
JavaScript实现弹出模态窗体并接受传值的方法
2016/02/12 Javascript
javascript 分号总结及详细介绍
2016/09/24 Javascript
深入理解Node.js的HTTP模块
2016/10/12 Javascript
通过修改360抢票的刷新频率和突破8车次限制实现方法
2017/01/04 Javascript
JS实现微信摇一摇原理解析
2017/07/22 Javascript
jquery+css实现Tab栏切换的代码实例
2019/05/14 jQuery
微信小程序简单的canvas裁剪图片功能详解
2019/07/12 Javascript
vue 中几种传值方法(3种)
2019/11/12 Javascript
环形加载进度条封装(Vue插件版和原生js版)
2019/12/04 Javascript
详解Vue的watch中的immediate与watch是什么意思
2019/12/30 Javascript
[02:39]DOTA2英雄基础教程 天怒法师
2013/11/29 DOTA
[01:11:10]2014 DOTA2华西杯精英邀请赛 5 24 iG VS VG加赛
2014/05/26 DOTA
让python json encode datetime类型
2010/12/28 Python
Python3学习urllib的使用方法示例
2017/11/29 Python
Django实现简单分页功能的方法详解
2017/12/05 Python
利用Python如何生成hash值示例详解
2017/12/20 Python
对python dataframe逻辑取值的方法详解
2019/01/30 Python
python 利用Pyinstaller打包Web项目
2020/10/23 Python
用CSS3实现瀑布流布局的示例代码
2017/11/10 HTML / CSS
一个精品风格的世界:Atterley
2019/05/01 全球购物
Wilson体育用品官网:美国著名运动器材品牌
2019/05/12 全球购物
大学生求职自我评价
2014/01/16 职场文书
中班开学寄语
2014/04/04 职场文书
公司承诺书怎么写
2014/05/24 职场文书
小学语文教学经验交流材料
2014/06/02 职场文书
我的梦想演讲稿500字
2014/08/21 职场文书
海上钢琴师的观后感
2015/06/11 职场文书
小学英语教学反思范文
2016/02/15 职场文书
如何理解python接口自动化之logging日志模块
2021/06/15 Python
Python借助with语句实现代码段只执行有限次
2022/03/23 Python