数据框是下一个:
numpy = np.zeros((df.x.max()+1, df.y.max()+1))
numpy[df.x, df.y] = df.Value
plt.figure(figsize=(14, 7))
heatmap = sns.heatmap(numpy.T, cmap="Blues", xticklabels=False, yticklabels=False).get_figure().savefig("world_heatmap.png", dpi=300)
numpy1= np.zeros((df.x.max()+1, df.y.max()+1))
numpy1[df.x, df.y] = df.Appearance_percentage
probheatmap = sns.heatmap(numpy1.T, cmap="Blues", xticklabels=False, yticklabels=False).get_figure().savefig("world_probheatmap.png", dpi=300)
numpy2 = np.zeros((df.x.max()+1, df.y.max()+1))
numpy2[df.x, df.y] = df.Few_clouds
bestzonesheatmap = sns.heatmap(numpy2.T, cmap="Blues", xticklabels=False, yticklabels=False).get_figure().savefig("world_bestzonesheatmap.png", dpi=300)
有了这些,我得到了:
如您所见,每个热图就像重叠另一个热图。有人知道我在做什么错吗?谢谢!!!!! <3
PD:热图还可以,在每个热图旁边可以看到的是错误的。