matplotlib将多个图显示在一张图像上

将多张图显示在一张图像上

import matplotlib.pyplot as plt

images.shape
[20,512,512]

for i in range(20):
    plt.subplot(4 , 5 , i+1)
    plt.imshow(images[i, :, :]     # 通过for循环逐个显示图像
    plt.xticks([])                 # 去掉x轴的刻度
    plt.yticks([])
plt.show()
posted @ 2020-01-21 11:19  重大的小鸿  阅读(6225)  评论(0编辑  收藏  举报