gpt4 book ai didi

python - matplotlib,重新安装后每个文本都是粗体

转载 作者:行者123 更新时间:2023-12-01 06:30:37 27 4
gpt4 key购买 nike

我的 matplotlib 出现错误,所以我卸载并使用 conda 重新安装它,但现在每个文本都是粗体:

import matplotlib.pyplot as plt
import seaborn as sns

plt.title('Inputs characters length distribution')
sns.distplot([len(i) for i in dataset['input'].tolist()])
plt.show()

figure

我有:

  • python 3.6.9
  • conda 4.8.1
  • matplotlib 3.1.1
  • seaborn 0.10.0

怎样才能让它们恢复正常?

最佳答案

通过手动设置字体修复:

plt.rcParams["font.family"] = "Verdana"

我仍然不知道是什么导致了这个问题。

关于python - matplotlib,重新安装后每个文本都是粗体,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59929555/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com