Python做图时遇到中文标题乱码的情况 ,试了好几个该方法都不行,最后终于解决了

Python做图时遇到中文标题乱码

利用在代码开始添加

from matplotlib.font_manager import FontProperties
font_set = FontProperties(fname=r"c:\windows\fonts\simsun.ttc", size=12)

plt.title("周一至周五购物时段分布图",fontproperties=font_set)

解决

Python做图时遇到中文标题乱码

参考文章:https://blog.csdn.net/weixin_43186036/article/details/82881748

相关文章:

  • 2021-08-28
  • 2021-12-21
  • 2022-12-23
  • 2022-01-06
  • 2021-07-13
  • 2022-12-23
  • 2022-12-23
  • 2021-06-21
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-26
  • 2021-06-19
  • 2022-12-23
  • 2021-07-03
  • 2021-07-09
相关资源
相似解决方案