課程
/后端開發
/Python
/機器學習-實現簡單神經網絡
matlab 的label 如何顯示中文哈?
2017-04-23
源自:機器學習-實現簡單神經網絡 4-4
正在回答
from matplotlib.font_manager import FontPropertiesplt.xlabel('花瓣的長度', fontproperties=font_set)plt.ylabel('花莖的長度', fontproperties=font_set)
from matplotlib.pylab import mpl
mpl.rcParams['font.sans-serif'] = ['SimHei']
plt.scatter(x[:50,0],x[:50,1],color='red',marker='o',label='setosa');
plt.scatter(x[50:100,0],x[50:100,1],color='blue',marker='x',label='versicolor');
plt.xlabel('花徑長度')
plt.ylabel('花瓣的長度')
plt.legend(loc = 'upper left');
lxus
舉報
人工智能時代,你準備好成為抓住機遇的那百分之二嗎。
2 回答matplotlib怎么才能顯示中文?
2 回答1.中文顯示不出 2.markers是什么?從哪里的?有圖
3 回答python中用matplotlib作圖漢字怎么顯示,顯示的是小方塊
1 回答讓圖形在單獨的窗口中顯示
2 回答數據顯示問題
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
2017-10-29
from matplotlib.font_manager import FontProperties
plt.xlabel('花瓣的長度', fontproperties=font_set)
plt.ylabel('花莖的長度', fontproperties=font_set)
2017-05-20
from matplotlib.pylab import mpl
mpl.rcParams['font.sans-serif'] = ['SimHei']
2017-04-23
plt.scatter(x[:50,0],x[:50,1],color='red',marker='o',label='setosa');
plt.scatter(x[50:100,0],x[50:100,1],color='blue',marker='x',label='versicolor');
plt.xlabel('花徑長度')
plt.ylabel('花瓣的長度')
plt.legend(loc = 'upper left');