我想将我的值Label与饼图连接起来。我正在使用pie3D,但未找到任何选项。 这是我当前的代码和饼图:
par(mfrow=c(3,2))
for (i in seq_along(vec1)){
#Data for pie
#select the column i of varcomp
r<- subset(varcomp, select=vec1[i])
r1<-r[6:13,]
#for displaying percentage values
piepercent<- round(100*r1/sum(r1), 1)
piepercent<-round(piepercent, digits=0)
p<-pie3D(#data for pie
r1,
#specify labels vector
#labels=piepercent,
#specify labels size
labelcex=0.9,
#how much different pies go from each other
explode=0.1,
#height of chart
height=0.1,
#Main title
theta=pi/3,
#Colors
col=colors,
main=c("Variance Components",paste(vec1[i])))
pie3D.labels(p,labels=piepercent,labelcex=1,labelrad=1.8)
}