解决问题方法:
首行起添加如下代码(不包括“”,不知道#怎么在开头打出)
“# --coding:GBK --”
“# -- coding: utf-8 --”
from pylab import *
mpl.rcParams[‘font.sans-serif’] = [‘SimHei’]
注意上述代码自己打,编译器转译时显示出来的都是中文状态下输入的字符
要使用英文输入法

win10 Python35 单独 使用utf-8会有语法问题(但是注释,print()函数可以只用utf-8)
只用前面 两个行代码会出现乱码(文字以方框形式表达出来)
为甚:不晓得,反正能用了

参考资料:
1>https://blog.csdn.net/u012399684/article/details/81809220
2>https://blog.csdn.net/u012399684/article/details/81809220
matplotlib使用utf-8无法输出汉字
matplotlib使用utf-8无法输出汉字

相关文章:

  • 2021-11-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-09
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-14
  • 2021-08-15
  • 2021-11-20
  • 2022-12-23
  • 2022-12-23
  • 2022-02-10
相关资源
相似解决方案