极区图

用每块区域的半径r和它所占的角度指定在极区图所占的比例

import numpy
import matplotlib.pyplot as plt
plt.figure(figsize=(8,8))
plt.axes(polar=True)
theta=numpy.arange(0.,2*numpy.pi,2*numpy.pi/8)
#角度
radii=numpy.array([4,7,5,3,1,5,6,7])
#半径长
plt.bar(theta,radii,width=(2*numpy.pi/8),bottom=0.0)

这里写图片描述

猜你喜欢

转载自blog.csdn.net/qq_41357131/article/details/80285017
今日推荐