我正在修改我之前在 ggforce 中发布的有限数量的几何图形?. 我当时以为我错了,但我现在可以更清楚地重建它:我想绘制 N 个圆圈,一个在另一个之上。无论我要绘制多少个圆圈,圆圈#11-N 都绘制在前 10 个圆圈的下方。这说明了问题:
library(tidyverse)
library(ggforce)
circles <- data.frame(
x0 = seq(1, 30),
y0 = seq(1, 30),
r = 2
)
ggplot() +
geom_circle(aes(x0 = x0, y0 = y0, r = r), fill = "grey", data = circles) +
coord_fixed()
因此,当我想绘制同心圆时,前 10 个圆隐藏了所有其他圆。我可以通过首先绘制 11-N 个圆圈然后是前十个圆圈来编写解决方法,但它并不优雅