파 이 썬 홀 랜 드 인격 분석 레이더 도

11456 단어 Python
###           
import numpy as np
import matplotlib.pyplot as mplp
import matplotlib as mpl

mpl.rcParams['font.family']='SimHei'

###     
STRNPLISTlabels = np.array(['   (I)','   (A)','   (S)','   (E)','   (C)','   (R)'])
INTattr = 6
INTNPLISTdata = np.array([[0.40, 0.32, 0.35, 0.30, 0.30, 0.88],
 	                 [0.85, 0.35, 0.30, 0.40, 0.40, 0.30],
         	         [0.43, 0.89, 0.30, 0.28, 0.22, 0.30],
                 	 [0.30, 0.25, 0.48, 0.85, 0.45, 0.40],
           	         [0.20, 0.38, 0.87, 0.45, 0.32, 0.28],
                	 [0.34, 0.31, 0.38, 0.40, 0.92, 0.28]])                 #   
STRSETlabels = ('   ', '   ', '   ', '   ', '     ','   ')
INTNPLISTangles = np.linspace(0, 2*np.pi, INTattr, endpoint=False)

INTNPLISTdata = np.concatenate((INTNPLISTdata, [INTNPLISTdata[0]]))
INTNPLISTangles = np.concatenate((INTNPLISTangles, [INTNPLISTangles[0]]))

MAPfig = mplp.figure(facecolor="white")
mplp.subplot(111, polar=True)
mplp.plot(INTNPLISTangles,INTNPLISTdata,'o-', linewidth=1, alpha=0.2)
mplp.fill(INTNPLISTangles,INTNPLISTdata, alpha=0.25)
mplp.thetagrids(INTNPLISTangles*180/np.pi, STRNPLISTlabels,frac = 1.2)
mplp.figtext(0.52, 0.95, '       ', ha='center', size=20)

MAPlegend = mplp.legend(STRSETlabels, loc=(0.94, 0.80), labelspacing=0.1)

mplp.setp(MAPlegend.get_texts(), fontsize='large')
mplp.grid(True)
mplp.savefig('          .jpg')
mplp.show()

좋은 웹페이지 즐겨찾기