P11-Image 图像
import matplotlib.pyplot as plt
import numpy as np
# image data
a = np.array([0.313660827978, 0.365348418405, 0.423733120134,
0.365348418405, 0.439599930621, 0.525083754405,
0.423733120134, 0.525083754405, 0.651536351379]).reshape(3,3)
# imshow image show a 图像数据 interpolation 图像显示风格
# cmap color map origin 图像中颜色的排分布式
plt.imshow(a, interpolation='nearest', cmap='bone', origin='lower')
# plt.colorbar 颜色bar shrink 压缩比例
plt.colorbar(shrink=.92)
plt.xticks(())
plt.yticks(())
plt.show()