📜  plt imshow python 代码示例

📅  最后修改于: 2022-03-11 14:45:28.018000             🧑  作者: Mango

代码示例1
import matplotlib.pyplot as plt
w = 4
h = 3
d = 70
plt.figure(figsize=(w, h), dpi=d)
x = [[3, 4, 5],
     [2, 3, 4],
     [1, 2, 3]]

color_map = plt.imshow(x)
color_map.set_cmap("Blues_r")
plt.colorbar()
plt.savefig("out.png")