更新 matplotlib 时出现问题,热图显示正常

问题描述 投票:0回答:1

这是我用过的代码。

%matplotlib inline import matplotlib.pyplot as plt import seaborn as sn plt.figure(figsize=(10,7)) sn.heatmap(cm, annot=True) plt.xlabel('Predicted') plt.ylabel('Truth')

我尝试更新 matplotlib 但更新后,同样的问题

python matplotlib jupyter-notebook heatmap
1个回答
0
投票
import seaborn as sns
glue = sns.load_dataset("glue").pivot(index="Model", columns="Task", values="Score")
sns.heatmap(glue)

输出:

© www.soinside.com 2019 - 2024. All rights reserved.