当前位置:   article > 正文

python matplotlib这么同时显示多张图片在同一个图中_csdn输出图像展示在同一张图中cv。imshow

csdn输出图像展示在同一张图中cv。imshow

CIFAR10读进来的图像的的维度是(50000,32,32,3),插入以下代码就可以用了,

img_test = images_test[:32, :, :, :]

选取前32张显示

  1. plt.figure()
  2. for i in range(1,32):
  3. plt.subplot(4,8,i)
  4. plt.imshow(img_test[i-1])
  5. plt.show()

这就是显示的结果

在代码中加入下面两行则没有坐标了

  1. plt.figure()
  2. for i in range(1,32):
  3. plt.subplot(4,8,i)
  4. plt.imshow(img_test[i-1])
  5. plt.xticks([])
  6. plt.yticks([])
  7. plt.show()

声明:本文内容由网友自发贡献,转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号