目标图形
球员能力图=四个能力子图
基础布局
import numpy as np
import matplotlib.pyplot as plt
plt.style.use('ggplot')
ax1=plt.subplot(221,projection='polar')
ax2=plt.subplot(222,projection='polar')
ax3=plt.subplot(223,projection='polar')
ax4=plt.subplot(224,projection='polar')
能力
设置能力数量和能力标签
ability_size=6
ability_label=['进攻','防守','盘带','速度','体力','射术']
子图绘制
极坐标闭合图,首尾相接
首尾相连
生成角度值
平分成6份
theta = np.linspace(0, 2 * np.pi, 6, endpoint=False)
追加值
theta = np.append(theta, theta[0])
player['M'] = np.append(player['M'], player['M'][0])
player['N'] = np.append(player['N'], player