简体   繁体   English

matplotlib,重新安装后每条文字都是粗体

[英]matplotlib, every text is bold after re-installing

I had an error with matplotlib so I uninstalled and re-installed it using conda, but now every text is bold:我在使用 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()

数字

I have:我有:

  • python 3.6.9蟒蛇 3.6.9
  • conda 4.8.1康达 4.8.1
  • matplotlib 3.1.1 matplotlib 3.1.1
  • seaborn 0.10.0海生 0.10.0

How can I put them back to normal?我怎样才能让它们恢复正常?

Fixed by setting the font manually :通过手动设置字体修复:

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

I still don't know what caused the issue.我仍然不知道是什么导致了这个问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM