我正在尝试创建饼图,如here,但图例和实际饼图重叠。饼图和图例重叠
我使用的代码是在这里:
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")
有人能帮助我吗?
据我所知''grid'和'ggplot2'是红色鲱鱼 - 这里的一切似乎都是基础R,你不需要加载那些包(应该是无害的) –