Solve the problem of spyder drawing Chinese garbled characters on mac computers

Solve the problem of spyder drawing Chinese garbled characters on mac computers

There are many ways to search on the Internet, you need to download the font of Microsoft Yahei and put it in the specified directory, but the search font does not seem to be on the mac, and later found that the mac only needs to use its own Chinese font. Add a sentence
plt.rcParams ['font.sans-serif'] = ['Arial Unicode MS']
path = "./"

Add u in front of the place where Chinese is used

Published 35 original articles · Liked 20 · Visitors 50,000+

Guess you like

Origin blog.csdn.net/weixin_39875181/article/details/103953628