标签:tor ids img concat alpha alt file col font
# -*- coding: utf-8 -*- """ Spyder Editor This is a temporary script file. """ import numpy as np import matplotlib.pyplot as plt import matplotlib matplotlib.rcParams[‘font.family‘]=‘SimHei‘ matplotlib.rcParams[‘font.sans-serif‘]=[‘SimHei‘] labels=np.array([‘初识Python语言‘,‘第二周作业‘,‘第三周作业‘,‘第四周作业‘,‘第五周作业‘,‘第六周作业‘]) nAttr=6 data=np.array([50,96.7,100,100,110,70]) angles=np.linspace(0,2*np.pi,nAttr,endpoint=False) data=np.concatenate((data,[data[0]])) angles=np.concatenate((angles,[angles[0]])) fig=plt.figure(facecolor="white") plt.subplot(111,polar=True) plt.plot(angles,data,‘bo-‘,color=‘g‘,linewidth=2) plt.fill(angles,data,facecolor=‘g‘,alpha=0.25) plt.thetagrids(angles*180/np.pi,labels) plt.figtext(0.52,0.95,‘26卢英倩‘,ha=‘center‘) plt.grid(True) plt.savefig(‘dota_radar.JPG‘) plt.show()
标签:tor ids img concat alpha alt file col font
原文地址:https://www.cnblogs.com/luyingqian/p/10746551.html