首先保证电脑里是否安装了中文字体,然后找到他们!!
具体步骤如下:
先打开终端,command+空格 搜索 ter,然后会蹦出终端,点开
输入 fc-list :lang=zh
如果显示command not found
输入 conda install fontconfig
然后输入 y
然后就安装好了!!!!
再输入fc-list :lang=zh
好了,看看有哪些字体
剩下就是anaconda的操作了
import matplotlib.pyplot as plt
plt.rcParams["font.family"] = 'Arial Unicode MS'
import matplotlib
a=