将字体文件拷贝到任意目录

fonts = matplotlib.font_manager.FontProperties(fname='/home/prefer/Fonts/simhei.ttf', size=23)
...
plt.title("标题",fontproperties=fonts)
...
plt.plot(x, y, label=u'图例')
...
plt.legend(prop=fonts)

 

相关文章:

  • 2022-02-25
  • 2021-04-06
  • 2022-01-28
  • 2022-01-12
  • 2021-05-19
  • 2022-03-09
  • 2021-12-07
  • 2021-12-15
猜你喜欢
  • 2021-09-08
  • 2021-08-27
  • 2021-04-30
  • 2021-11-13
  • 2021-08-13
  • 2022-12-23
相关资源
相似解决方案