python使用pyplots将图片合并在一起

时间:2018-04-12 07:53:17

标签: python matplotlib

我正在尝试平铺图像以形成4个象限,以便我的图像看起来像这样:

enter image description here

然而,我的图像是这样的:

enter image description here

以下是我在编码方面所做的工作:

from matplotlib import pyplot as plt

f, ax = plt.subplots(2,2)
ax[0,0].imshow(image1)
ax[1,0].imshow(image2)
ax[0,1].imshow(image3)
ax[1,1].imshow(image4)
plt.show()
#assuming image1~4 are different images

如果每个图像都是10x10像素图像,如何将它们合并为一个20x20像素图像?

0 个答案:

没有答案