The following problem occurs when I am drawing a picture:
MatplotlibDeprecationWarning: Adding an axes using the same arguments as a previous axes currently reuses the earlier instance. In a future version, a new instance will always be created and returned. Meanwhile, this warning can be suppressed, and the future behavior ensured, by passing a unique label to each axes instance.
warnings.warn(message, mplDeprecation, stacklevel=1)
My program is as follows:
plt.ion() # interactive mode
for i in range(64):
ax = plt.subplot(8, 8, i + 1)
#ax.set_title('Sample #{}'.format(i))
ax.axis('off')
plt.imshow(y[0].data.cpu().numpy()[0,i,:,:],cmap='jet')
plt.show()
plt.savefig('feature.png')
How can I solve it?
plt.ioff()
plt.show()