如何設置matplotlib顯示數組的每個圖像?如何設置matplotlib顯示數組的每個圖像?
我想那每次我點擊右箭頭,這表明下一個圖像等...
這可能嗎?
width = 14
height = 14
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
data_images = X_train.reshape(X_train.shape[0],width,height)
print "Shape " ,data_images.shape #Shape (50000L, 14L, 14L)
plt.imshow(data_images[0])
plt.show()
我想通過「data_images」變量plt.imshow所以每次我點擊旁邊的matplotlib,它會顯示下一個圖像。
肘http://matplotlib.org/1.5.0/examples/pylab_examples/toggle_images.html – furas
但我有50 000圖片。我不能繼續做im2.getVisible等所有的人。 – KenobiShan
最重要的是'plt.connect(...)' – furas