解決matplotlib將中文顯示成白框框的問題

解決方法很簡單,在導入plt包後面加入兩條語句。以下 python import matplotlib.pyplot as plt plt.rcParams['font.sans-serif']=['SimHei'] #用來正常顯示中文標籤 plt.rcParams['axes.unicode_minus']=False #用來正常顯示負號
相關文章
相關標籤/搜索