plt画图记录 多幅子图: x=np.load('data/X_100%.npy') fig, ax = plt.subplots( nrows=5, ncols=5, sharex=True, sharey=True, ) ax = ax.flatten() for i in range(25): img = x[i].reshape(28, 28) ax[i].imshow(img, cmap='Greys', interpolation='nearest') 结果如下: