11Image图片

import matplotlib.pyplot as plt
import numpy as np

#image data
a = np.array([0.31366,0.36534,0.42373,
              0.36534,0.43959,0.53444,
              0.42333,0.52555,0.65566]).reshape(3,3)

plt.imshow(a,interpolation='nearest',cmap='bone',origin='upper')
plt.colorbar()


plt.xticks(())
plt.yticks(())
plt.show()

image-20230131175442268

posted @ 2023-01-31 20:34  不迷路的小孩  阅读(8)  评论(0编辑  收藏  举报