Matplotlib 中文亂碼問題

Matplotlib 有個讓人惱火的問題是,默認情況下,Matplotlib 中文會亂碼。 x = ['北京', '上海', '深圳', '廣州'] y = [60000, 58000, 50000, 52000] plt.plot(x, y) plt.show() 可以看到,上面所有的中文都亂碼了,顯示成方框了,如何解決呢? 其實只需要配置下後臺字體即可。 plt.rcParams['font.
相關文章
相關標籤/搜索