Я хочу связать свою метку значения с круговой диаграммой.Я использую 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)
}
![graph I get](https://i.stack.imgur.com/iY56m.png)
![Graph I want](https://i.stack.imgur.com/dYNl1.png)