📌  相关文章
📜  findfont:找不到字体系列 ['Times New Roman'].回到 DejaVu Sans. findfont:找不到字体系列 ['Times New Roman'].回到 DejaVu Sans. - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:42.104000             🧑  作者: Mango

代码示例1
#Assuming you working on conda:
conda install -c conda-forge mscorefonts
#Then detete the cache as follows:
rm ~/.cache/matplotlib -rf
#Use the following as fit:
import matplotlib
myfonts = "Times New Roman"
matplotlib.rcParams['font.family'] = "sans-serif"
matplotlib.rcParams['font.sans-serif'] = myfonts