pandas繪圖中文字會(huì)出現(xiàn)方框的亂碼池凄。
解決步驟:
* 1 找到C:\Users\Administrator\Anaconda3\Lib\site-packages\matplotlib\mpl-data\matplotlibrc.py品嚣,打開
* 2 修改
font.family : sans-serif
font.style? ? ? ? ? : normal
font.variant? ? ? ? : normal
font.weight? ? ? ? : medium
font.stretch? ? ? ? : normal
*3修改嫉你,加入?SimHei,? 或者simsun,?要看window自帶什么中文字體包思灌,一般simsun是有的
font.serif : SimHei, DejaVu Serif, Bitstream Vera Serif, New Century Schoolbook, Century Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New Roman, Times, Palatino, Charter, serif
font.sans-serif? ? : SimHei, DejaVu Sans, Bitstream Vera Sans, Lucida Grande, Verdana, Geneva, Lucid, Arial, Helvetica, Avant Garde, sans-serif
4修改
axes.unicode_minus : False ? ?# use unicode for the minus symbol
5.保存就行了