import matplotlib.pyplot as plt
plt.imshow(digits.images[-1], cmap = plt.cm.gray_r)
.imshow()
Plotting numpy arrays as images
plt.cm.gray_r
Colormap
加上_r
相當於顏色 reverse 。
import matplotlib.pyplot as plt
plt.imshow(digits.images[-1], cmap = plt.cm.gray_r)
.imshow()
Plotting numpy arrays as images
plt.cm.gray_r
Colormap
加上_r
相當於顏色 reverse 。
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。