Seaborn热图未正确显示

时间:2019-11-29 09:27:13

标签: python pandas seaborn

我使用下面的代码创建了一个令人印象深刻的热图,但它似乎不合适。关于代码可能出问题的任何想法?

ax = sns.heatmap(cm, linewidths=.2, linecolor='gray', cmap=sns.cubehelix_palette(light=1, as_cmap=True),
                 annot=True, fmt=fmt, vmin=0.0, vmax=vmax, square=True)

ax.set_xlabel(xlabel)
ax.set_ylabel(ylabel)
ax.set_title(title)
ax.set_yticklabels([x for x in ticks][::-1], rotation=0, size=9)
ax.set_xticklabels([x for x in ticks], rotation=0, size=9)

plt.tight_layout()
plt.savefig(dir_out + os.sep + fname, dpi=cc.DPI)
plt.close()

ap not showing up

0 个答案:

没有答案