Radar Python simple drawing

import numpy as np
import matplotlib.pyplot as plt
import matplotlib
matplotlib.rcParams['font.family'] = 'SimHei'
matplotlib.rcParams['font.sans-serif'] = ['SimHei']
lables = np.array(['综合','KDA','发育','推进','生存','输出'])
nAttr = 6
date = np.array([7, 5, 6, 9, 8, 7])
angles = np.linspace(0, 2*np.pi, nAttr, endpoint=False)
date = np.concatenate((date, [date[0]]))
angles = np.concatenate((angles, [angles[0]]))
fig = plt.figure(facecolor="white")
plt.subplot(111, polar=True)
plt.plot(angles, date, 'bo-', color = 'g', linewidth = 2)
plt.fill(angles, date, facecolor = 'g', alpha = 0.25)
plt.thetagrids(angles*180/np.pi, lables)
plt.figtext (0.52, 0.95, 'DOTA radar FIG ability value', HA = 'Center')
plt.grid (True)
plt.savefig ( 'dota_radar.JPG')
plt.show ()
renderings:

Guess you like

Origin www.cnblogs.com/walkwaters/p/12094284.html