レーダーPythonの簡単な描画

NPのようなインポートnumpyの
PLTのようなインポートmatplotlib.pyplot
インポートmatplotlibのを
matplotlib.rcParams [ 'font.family'] = 'SimHei'
matplotlib.rcParams [ 'font.sans-セリフ'] = [ 'SimHei']
lables = np.array( [ '综合'、 'KDA'、 '发育'、 '推进'、 '生存'、 '输出'])
nAttr = 6
日= np.array([7、5、6、9、8、7])
角度= np.linspace(0,2 * np.pi、nAttr、終点=偽)
日付= np.concatenate((日付、[日付[0]))
角度= np.concatenate((角度、[角度[0] ]))
図= plt.figure(のFaceColor = "白")
plt.subplot(111、極性= TRUE)
plt.plot(角度、日付、 'bo-'、色= 'G'、線幅= 2)
PLT。フィル(角度、日付、のFaceColor = 'G'、アルファ= 0。25)
plt.thetagrids(角度* 180 / np.pi、lables)
plt.figtext(0.52、0.95、 'DOTAレーダー図の能力値'、HA = 'センター')
plt.grid(真)
plt.savefig( 'dota_radar.JPG')
plt.show()
レンダリング:

おすすめ

転載: www.cnblogs.com/walkwaters/p/12094284.html