Matplotlib 快速绘制多张图片

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u012515223/article/details/82590337

Mac中,使用TkAgg样式

import matplotlib
matplotlib.use('TkAgg')

import matplotlib.pyplot as plt

subplot,131,表示1行3列的第1个;其余类似。

plt.subplot(131)
plt.imshow(data[0][0].asnumpy())
plt.subplot(132)
plt.imshow(data[0][1].asnumpy())
plt.subplot(133)
plt.imshow(data[0][2].asnumpy())

输出:

123

猜你喜欢

转载自blog.csdn.net/u012515223/article/details/82590337