python matplotlib 多图像排列显示
用OpenCV和matplotlib实现多图排列,代码如下:
import cv2
import matplotlib.pyplot as plt img = cv2.imread('C:\\Users\\admin\\Desktop\\original_img3\\testimg\\lena_300_500.jpg') plt.subplot(221)
plt.title('img1')
plt.xticks([]) # remove ticks
plt.yticks([])
# The color channel order in matplotlib is [R, G, B]
# The color channel order in opencv is [B, G, R]
plt.imshow(img[:, :, ::-1]) plt.subplot(222)
plt.title('img2')
plt.xticks([])
plt.yticks([])
plt.imshow(img[:, :, ::-1]) plt.subplot(223)
plt.title('img3')
plt.xticks([])
plt.yticks([])
plt.imshow(img[:, :, ::-1]) plt.subplot(224)
plt.title('img4')
plt.xticks([])
plt.yticks([])
plt.imshow(img[:, :, ::-1])
效果如下:

python matplotlib 多图像排列显示的更多相关文章
- python matplotlib包图像配色方案
可选的配色方案: Accent, Accent_r, Blues, Blues_r, BrBG, BrBG_r, BuGn, BuGn_r, BuPu, BuPu_r, CMRmap, CMRmap_ ...
- Python Matplotlib.pyplot plt 中文显示
话不多说,上代码 # -*- coding: UTF-8 -*- import matplotlib.pyplot as plt from matplotlib.font_manager import ...
- Python Matplotlib 中对于 bar 显示时间的问题
参考: 官方教程: http://matplotlib.org/1.3.1/users/recipes.html http://stackoverflow.com/questions/13515471 ...
- python 用PIL Matplotlib处理图像的基本操作
在 python 中除了用 opencv,也可以用 matplotlib 和 PIL 这两个库操作图片.本人偏爱 matpoltlib,因为它的语法更像 matlab. 一.matplotlib 1. ...
- python matplotlib 中文显示参数设置
python matplotlib 中文显示参数设置 方法一:每次编写代码时进行参数设置 #coding:utf-8import matplotlib.pyplot as pltplt.rcParam ...
- python matplotlib plot 数据中的中文无法正常显示的解决办法
转发自:http://blog.csdn.net/laoyaotask/article/details/22117745?utm_source=tuicool python matplotlib pl ...
- python matplotlib 中文显示乱码设置
python matplotlib 中文显示乱码设置 原因:是matplotlib库中没有中文字体.1 解决方案:1.进入C:\Anaconda64\Lib\site-packages\matplot ...
- python matplotlib.pyplot对图像进行绘制
imshow()是对图像进行绘制 imshow()函数格式为: matplotlib.pyplot.imshow(X, cmap=None) X: 要绘制的图像或数组. cmap: 颜色图谱(colo ...
- python包matplotlib绘制图像
使用matplotlib绘制图像 import matplotlib.pyplot as plt from matplotlib.pyplot import MultipleLocator impor ...
随机推荐
- 如何阻止<a>标签默认行为和表单提交
阻止<a>标签默认行为 方式一 (通过return false) <!DOCTYPE html> <html> <head> <meta char ...
- mysql5.7 环境准备
原文源自:https://www.cnblogs.com/activiti/p/7810166.html 操作系统为centos7 .修改 /etc/my.cnf,在 [mysqld] 小节下添加一行 ...
- jquery checked选择器 语法
jquery checked选择器 语法 作用::checked 选择器选取所有选中的复选框或单选按钮.直线电机参数 语法:$(":checked") jquery checked ...
- CDOJ 1133 菲波拉契数制 变直接统计为构造
菲波拉契数制 Time Limit: 3000/1000MS (Java/Others) Memory Limit: 65535/65535KB (Java/Others) Submit St ...
- AVPython:Python Support for ArcView
AVPython embeds the Python programming language within ArcView GIS 3.x. This project will also encom ...
- go之流程控制
一.与用户交互 var name string fmt.Scanln(&name) # 一定得传指针,因为我要修改的是name的值 fmt.Println(name) 二.if判断 1.if ...
- 数据分析师面经一(bk)
2019年第一个数据分析面试: 先说一下心理感受,在BOSS多次看到这个岗位了,但是 呢一直没勇气去投这个岗位.首先毕竟是一个知名企业一万+人的公司,心里多少底气不足(小公司待习惯了吧),而且看岗位要 ...
- Linux下MySQL报Table 'xxx' doesn't exist错误解决方法,表名存在大小写区分
Linux服务器上在线装了个MySQL,但是部署web应用时一直报后台一直报错:Table 'xxx' doesn't exist. 本地测试一直都是正常的,同样的代码,同样的数据库,表是存在的,但是 ...
- 震惊!文科生如何三个月转行成为Java工程师?
点击上方“程序员江湖”,选择“置顶或者星标” 你关注的就是我关心的! 作者:以大橘为重链接:https://www.nowcoder.com/discuss/156087 楼主是19届应届生,去年在牛 ...
- MediaFoundation初步研究
用MediaFoundation写了个媒体播放程序,封装成了DLL,MFVideo.dll,写了个使用例子