用seaborn库画
import seaborn as sns
import numpy as np
import matplotlib.pyplot as plt
data = np.array([[1,2,3],[4,5,6],[7,8,9]])
sns.heatmap(data,annot=True)
plt.show()
参考:
用seaborn库画
import seaborn as sns
import numpy as np
import matplotlib.pyplot as plt
data = np.array([[1,2,3],[4,5,6],[7,8,9]])
sns.heatmap(data,annot=True)
plt.show()
参考: