matplotlibの設定ZH-彼

1  から matplotlibのをインポートPLTとしてpyplot
 2  から matplotlibのをインポートfont_manager
 3  
4  インポートランダム
 5#あなたがfamaily位置をフォント
 6 font_pro = font_manager.FontProperties(FNAME = ' :\ Windowsの\フォント\のSIMYOU.TTF C ' 7  
8  
9 X =範囲(0,12 10  
11、Y = [random.randint(10,40)のためにそれ範囲(0、12 )]
 12  
13 xlabels = [ ' 第{}次' .format(I)のために I における範囲(12 )]
 14位kwarg追加 
 15 plt.xticks(X、xlabels、fontproperties = font_pro)を
 16  
17  plt.plot(x、y)を
 18 plt.show()

 

おすすめ

転載: www.cnblogs.com/jiujue/p/11299035.html