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 。
_r