我正在尝试绘制热图。
x轴上的值应该是像áéíóúý这样的unicode,依此类推,但我只能绘制一些信息。知道如何将值更改为unicode吗?
代码示例
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import numpy as np
df_cm = pd.DataFrame(cm_norm, index = [num_to_char(i) for i in np.sort(alphabet)],
columns = [num_to_char(i) for i in np.sort(alphabet)])
sns.heatmap(df_cm, annot=True, annot_kws={"size": 8}, cmap=plt.cm.Blues, square=0.5)