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正则表达式抓取成语网站
Nov 20 Python
Python脚本实现集群检测和管理功能
Mar 06 Python
python使用sorted函数对列表进行排序的方法
Apr 04 Python
详细介绍Python的鸭子类型
Sep 12 Python
多版本Python共存的配置方法
May 22 Python
深入浅析Python获取对象信息的函数type()、isinstance()、dir()
Sep 17 Python
python处理multipart/form-data的请求方法
Dec 26 Python
Python操作excel的方法总结(xlrd、xlwt、openpyxl)
Sep 02 Python
redis数据库及与python交互用法简单示例
Nov 01 Python
jenkins+python自动化测试持续集成教程
May 12 Python
python 爬虫网页登陆的简单实现
Nov 30 Python
Matplotlib可视化之添加让统计图变得简单易懂的注释
Jun 11 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
电脑硬件及电脑配置知识大全
2020/03/17 数码科技
PHP实现把数字ID转字母ID
2013/08/12 PHP
关于laravel5.5的定时任务详解(demo)
2019/10/23 PHP
javascript:以前写的xmlhttp池,代码
2008/05/18 Javascript
原生javascript兼容性测试实例
2013/07/01 Javascript
js如何判断不同系统的浏览器类型
2013/10/28 Javascript
jQuery实现为图片添加镜头放大效果的方法
2015/06/25 Javascript
开启Javascript中apply、call、bind的用法之旅模式
2015/10/28 Javascript
基于javascript实现九宫格大转盘效果
2020/05/28 Javascript
原生js实现类似fullpage的单页/全屏滚动
2017/01/22 Javascript
jquery.cookie.js的介绍与使用方法
2017/02/09 Javascript
jQuery+CSS3实现点赞功能
2017/03/13 Javascript
javascript 封装Date日期类实例详解
2017/05/28 Javascript
ReactNative短信验证码倒计时控件的实现代码
2017/07/20 Javascript
基于datepicker定义自己的angular时间组件的示例
2018/03/14 Javascript
JavaScript实现的DOM绘制柱状图效果示例
2018/08/08 Javascript
python利用urllib和urllib2访问http的GET/POST详解
2017/09/27 Python
Python编程之黑板上排列组合,你舍得解开吗
2017/10/30 Python
python实现将读入的多维list转为一维list的方法
2018/06/28 Python
python多进程实现文件下载传输功能
2018/07/28 Python
一百多行python代码实现抢票助手
2018/09/25 Python
使用Python实现将list中的每一项的首字母大写
2019/06/11 Python
Python3+Appium安装使用教程
2019/07/05 Python
Python列表原理与用法详解【创建、元素增加、删除、访问、计数、切片、遍历等】
2019/10/30 Python
Python爬虫实例——爬取美团美食数据
2020/07/15 Python
Python函数调用追踪实现代码
2020/11/27 Python
Marmot土拨鼠官网:美国专业户外运动品牌
2018/01/11 全球购物
活动志愿者自荐信
2014/01/27 职场文书
2014向国旗敬礼网上签名活动总结
2014/09/27 职场文书
公安机关查摆剖析材料
2014/10/10 职场文书
2015年爱国卫生工作总结
2015/04/22 职场文书
小学语文国培研修日志
2015/11/13 职场文书
小组组名及励志口号
2015/12/24 职场文书
MySQL查看表和清空表的常用命令总结
2021/05/26 MySQL
详解Vue项目的打包方式(生成dist文件)
2022/01/18 Vue.js
VMware虚拟机安装 Windows Server 2022的详细图文教程
2022/09/23 Servers