我的解决方法是这样的:
import pandas as pdimport matplotlib.pyplot as pltimport matplotlib.font_manager as fmfont = fm.FontProperties(fname='c:\windows\fonts\simsun.ttc') # speicify fontax = most_active_posts.plot(x = 'title',y = 'active_span',kind = 'barh')ax.set_xticklabels(most_active_posts['title'].str.depre('utf-8'), fontproperties=font)plt.show()基本上,您需要为中文字符指定有效字体。



