我正在尝试创建一个饼图,就像这里一样,但是图例和实际的饼图是重叠的。
我使用的代码在这里:
library(ggplot2)
library(grid)
par(mai = c(1,1,1,1))
numb <- c(41, 30, 21, 8)
colors <- c("black", "grey70", "grey30","white")
numb_labels <- round(numb/sum(numb) * 100, 1)
numb_labels <- paste(numb_labels, "%", sep="")
xx <- c("the process of familiarizing with the codebase",
"the patch review process",
"the impact on the users of the project",
"high degree visibility of the contributions")
pie(numb, col=colors, labels=numb_labels, clockwise=TRUE)
legend("top", legend = xx, fill=colors, bty="n")
有人能帮我吗?