|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
代码如下:
import matplotlib.pyplot as plt
import numpy as np
N = 10
theta = np.arange(0., 2*np.pi,2*np.pi/N) #生成角度值,划分10个角度
radii = np.array([40,20,16,15,15,14,12,12,12,12])#生成半径,半径大小对应文章数量
plt.axes([0.025,0.025,0.95,0.9],polar = True) #定义轴类型
colors = np.array(['lightgreen',"darkred","navy","brown","violet","plum","yellow","darkgreen","blue","red"])
labels = np.array(["Azamat,Jafar","Su,Jiaye","Matsuyama,Hideto","Kim,Daejoong","He,Gaohong","Jiang,Jianwen",
"Wei,Mingjie","Ghoufi,Aziz","Tokumasu, Takashi","Wang,Yong"]) #名字
bars = plt.bar(theta,radii,width=(2*np.pi/N),bottom=0.0,tick_label = labels,color = colors,alpha=0.5)
plt.show()
求助如何将这个标签的距离设置远一点呢,不要让标签与图像重合! |
|