python中pyplot圖表中文正常顯示

 pyplot製圖默認不支持中文顯示,例如如下代碼,圖表爲 # -*- coding:utf-8 -*- # author:qyy time:2019-5-29 import matplotlib.pyplot as plt x = [1, 2, 3, 4, 5] # 設置圖標標題,並給座標軸添加標籤 plt.title("直線", fontsize=24) plt.plot(x, x) p
相關文章
相關標籤/搜索